Cognitive state alteration system integrating multiple feedback technologies

ABSTRACT

A cognitive alteration system includes a storage unit at least to store one or more scripts, each to control a cognitive alteration process where the process comprises first and second in session media-based treatment processes and an out of session reinforcement stimulus process between the first and second in session processes, and where the storage unit stores both a script per in session process and a script per out of session process; a script handler at least to run at least one script; at least one of a wearable and a non-wearable element to sense an attribute of a subject or to provide an output to the subject during one of the in session and out of session processes; an information analyzer at least to perform analysis of the readings of the at least one element, an integrator to integrate the analysis and a script updater to update at least one of the scripts.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority from U.S. Provisional PatentApplication 62/201,749 filed Aug. 6, 2015 which is hereby incorporatedherein by reference.

FIELD OF THE INVENTION

The present invention relates to cognitive treatment systems generallyand to systems with integrated feedback technologies in particular.

BACKGROUND OF THE INVENTION

Cognitive state alteration techniques have been used throughout historyto help people in improving various areas of their life, in solvingspecific problem affecting the life or well-being of a person, as wellas for achieving specific goals.

Typical areas and goals include performance improvement (e.g. insports), concentration, weight loss, smoking cessation, pain reduction,stress reduction, behavior modification, sleeps disorders (sleepdeprivation and deficiency) and many more.

Cognitive state alteration techniques have mainly been used in twomodes: therapeutic and self-induced.

In therapeutic mode, a therapist interacts with the subject, performinga therapeutic session to achieve the desired results. A primary exampleof such mode is a hypnosis session performed by a hypnotherapist, butthis may also be a part of psychoanalysis or psychotherapeutic session.

In self-induced mode, a person performs the required actions by himselfor herself, without the involvement of a human therapist. Examplesinclude the use of self-hypnosis and some forms of meditation, as wellas the use of specialized systems (such as the one described in thisapplication) to achieve the desired cognitive state alteration as wellas the desired goals.

Cognitive state alteration techniques are usually performed during aspecific uninterrupted session (i.e. the subject is focused on anddedicated to performing the session). This is known as the “in session”period. However, the desired effects (behavioral change, reduced anxietyetc.) should also affect the regular day to day routine of the subjecti.e. during the “out of session” period.

It will be appreciated that the session duration of the “in session”period is not the same as the trance period (as described in more detailherein below), since a session may include multiple stages, some ofwhich are not spent in hypnotic trance state, notably the pre-trancerelaxation stage and the post-trance awakening stage.

The human mind may function in multiple and different states ofconsciousness. Some of them occur naturally, such as the regular (fullyawake and aware) state, or the state of regular sleep, and some willonly occur when artificially induced. Some are very common, and someoccur less often, such as day-dreaming with an associated loweredawareness.

Some of the states may further be divided into sub-states which may bedivided even further. For example, the sleeping state may be dividedinto REM (Rapid-Eye Movement) sleep and NREM (non-REM) sleep with NREMfurther sub-divided into multiple sub-states (such as NREM stage 1(drowsy), NREM stage 2 (sleep) and NREM stage 3 (deep sleep also knownas Slow Wave Sleep (SWS). An alternative analysis (used by some sources)separates NREM stage 3 from NREM stage 4 (SWS), with the latter beingcharacterized by a higher level of delta waves. These stages are furtherdescribed herein below.

Some states occur only under specific inducement or conditions, such asthe states entered by using some mind-affecting drugs. For example, thestate known as “highway hypnosis” can only occur when driving a familiarroute. In this state, a person can drive great distances, drivingperfectly, but without remembering doing so.

A person is typically in a given state at any given time, but maytransition to another state. Some transitions are very easy (e.g., aperson who is daydreaming or focuses on a task may be easily distractedby external noise) whereas some transitions are difficult to achieve(e.g., it may take a long time for a person to actually fall asleep).The methods and amount of effort required to transition into a givenstate may vary between different individuals, some people fall asleepeasily, and some take hours to do so. Furthermore, the effort involvedin state transitioning may vary for a given individual, e.g. the effortto fall asleep may very well depend on how tired the person is.

Hypnosis, or hypnotic trance, is another state of consciousnessinvolving focused attention and reduced peripheral awareness, andcharacterized by an enhanced capacity for response to suggestion. Thus,hypnosis can be used (e.g. in a hypnotherapy session) for theimplantation of a set of suggestions which may benefit the hypnotizedsubject in various life areas such as motivation, sleep, weight loss,smoking cessation etc.

Hypnosis is usually induced by a procedure known as a hypnotic inductioninvolving a series of preliminary instructions and suggestions. Theimplanted suggestions can be immediate (e.g. “your will feel better”) orcan be a future-oriented posthypnotic suggestion, affecting the subjectafter the hypnosis session has ended.

A posthypnotic suggestion may include a post-session behaviormodification (e.g. “you will feel a reduced desire to smoke” or “youwill feel less stressed when awakening”) or specific actions to beperformed.

The posthypnotic suggestion may be tied to a cue i.e. a specific triggerwhich will activate it (e.g. “whenever you touch a cigarette you willfeel nauseated”).

Such a suggestion may be positive (e.g. “when you start your dailytraining you will feel exhilarated”) or aversive (e.g. the cigaretteexample above) in nature.

There are many levels and sub-levels of trance. Hypnosis induced trancemay be shallow, deep or anywhere in between. In some levels, thehypnotized person may appear to be fully awake and aware of his or herenvironment, and in some levels he may appear to be fast asleep.Researchers have developed over the years numerous scales describingsuch different trance levels, ranging from high-level categorization tohighly detailed, 100+ stage scales. Two of the most commonly used arethe Harvard Group Scale of Hypnotic Susceptibility (HGSS) and theStanford Hypnotic Susceptibility Scale (SHSS). The various scales andstages may be correlated with various hypnotic session stage structures(i.e. division into stages and sub-stages).

It will be appreciated that trance levels are not fixed or “hard wired”,a specific hypnotic session structure may use specific trance levels notused by other hypnotic session structures.

Trance states are not unique to hypnosis. For example, daydreaming orthe state of concentrating when reading a book and visualizing its storyare also considered trance states. However, such trance states are veryshallow, and do not induce a heightened response to a suggestion,whereas the hypnotic trance states are much deeper and the hypnotizedperson is much more sensitive to suggestions.

Typically, the complete hypnotherapy process is performed during asession which is divided into stages. A typical set of stages mayinclude: introduction (opening the session and preparing the subject forthe upcoming stages); relaxation (initial hypnotic induction causing thesubject to enter a light hypnotic state), attention focusing (making thesubject more focused and attentive to additional instructions), testing(to check current trance level) and deepening (when the subjecttransitions into a higher trance level). The stages may continue withsuggestion/instruction (delivering the effective part (the “payload”) ofthe session, e.g. the suggestions relevant to smoking cessation etc.)and awakening (when the subject returns to a normal awake state). Itwill be appreciated that the stages are dynamic, and some stages may beskipped, prolonged or shortened.

Furthermore, some types of hypnotherapy sessions may include stages inwhich the user is some type of sleep state (e.g. employing sleep stagesin which the user is highly susceptible to suggestions). Some types ofhypnotherapy sessions may even end with the user asleep, i.e. the userhas left the trance state but is still in a normal sleep state.

During each stage the hypnotherapist (in a therapist/subject scenario)provides the appropriate instructions and induction to effect therequired transition between different states of consciousness. Theprogress between stages is not linear, e.g. a user may return to aprevious state due to (for example) interruption, non-effectiveinstructions or problems in the instructions delivery. Furthermore, theprogress between stages may lead the subject to an undesired state, suchas the subject becoming over-relaxed and falling asleep, and thehypnotherapist may have to resolve the situation and move the subjectback to a state more conducive to session continuation.

A session is typically performed over a contiguous time period, duringwhich there should be no interruptions and the subject should be able torest and relax as needed. Furthermore, the subject is typically requiredto be stationary during the session.

The hypnotherapist must be able to detect the state to which the subjecthas reached, in order to perform the appropriate steps and provide theright instructions, be it continuing with the current stage, deliveringspecific suggestions, advancing to the next stage, returning to aprevious stage, taking some other actions or stopping the sessionaltogether.

A single stage may include transitioning between multiple trance levels.For example, assuming a scale containing 10 different trance levels, adeepening stage (as described above) may be aimed at deepening thetrance from levels 2-3 to levels 6-7 (passing through the interveninglevels). Some stages might involve cognitive states which are not trancestates (or levels), e.g. an awakening state may include tasks to beperformed after the user has awakened and is not in a trance anymore.

There are numerous methods known in the art to detect and recognizetrance levels based (for example) on externally observable phenomena(e.g. pupil dilation), measureable physiological criteria (e.g. heartrate, brain wave reading) or on the level of susceptibility of thesubject to various specific suggestions. Some of these methods have beenemployed over the years by trained hypnotists and hypnotherapists,whereas some methods can only be employed through the use of measurementequipment (to measure some biological/biophysical aspects of thesubject) or in the context of machine-based hypnosis. Detecting thecurrent trance state of a subject may be a difficult and challengingtask, and sometimes impossible for a human, in particular when ahypnotherapist is required to closely observe minute details of thesubject's behavior for an extended period, and may become unfocusedhimself.

The hypnotherapy session is often based on a script, or a set ofscripts, which detail the instructions to be provided to the subjectsuch as any specific content or media to be displayed to the subject(e.g. audio, video, etc.) and the suggestions to be used.

The suggestions made during the dedicated “in session” period aretypically used to affect the subject during the “out of session period”i.e. outside of the session itself.

Many computerized systems aimed at supporting self-induced therapy (asdescribed here in above) have been developed over the years. The use ofsuch systems is often more convenient, accessible and economical thanthe use of a dedicated hypnotherapist (who can only handle one patientat a time).

Historically, such systems started with the use of fixed pre-recordedtherapeutic scripts which can be played over any audio playback device(computerized or not). They further evolved into self-hypnosis software,which included audio as well as visual stimuli.

Such systems may include such options as script customization, e.g.allowing the user to select specific script types, keywords or elementprogression; a pre-session questionnaire, allowing the user to providesome input data to the script (e.g. the user's name, favorite imagesetc.) and a post-session questionnaire, allowing the user to providesome feedback to the system on its effectiveness.

Some systems provide a degree of in-session interactivity. Regular userinteraction (e.g. asking the user to provide some keyboard/mousefeedback during session) is difficult, as the user is at rest while in atrance, and may be unable to perform complex actions. Interaction may belimited to execution of simple instructions (e.g. “lift your arm whenyou feel fully rested”). The system may then use sensors to measure somephysiological or physical parameters of the subject, and manage thesession based on the input gathered from these sensors.

One of the most common such physiological sensor is EEG(Electroencephalography). EEG sensors are typically located inside aheadband to be worn on the head. Many vendors produce consumer-grade EEGheadbands, including NeuroSky Inc., Emotive Inc. or Interaxon Inc.(providers of the Muse headset). Such headbands have become popular, inpart, due to their use with various brain training, meditation and focusimprovement systems which do not employ cognitive state alteration (CSA)techniques and do not place the user in any trance level.

It will be appreciated that even after substantial research there is nodefinitive and easy method to determine an “EEG hypnosis signature”.Some EEG patterns (e.g. the Alpha-Theta crossover) do correlate withhypnotic trance states, but are still not a definite indicator of such astate.

SUMMARY OF THE PRESENT INVENTION

There is provided, in accordance with an embodiment of the presentinvention, a cognitive alteration system including a storage unit atleast to store one or more scripts, each to control a cognitivealteration process where the process occurs within at least one of: adedicated session and a follow-up open time period and where the storageunit stores both a script per dedicated session and a script perfollow-up open time period for the process. The system also includes ascript handler at least to run at least one script from the storageunit; at least one of a wearable and a non-wearable element to sense anattribute of a subject or to provide an output to the subject during oneof the dedicated session and the follow-up open time period; aninformation analyzer at least to perform analysis of the readings of theat least one element and to provide results of the analysis to thescript runner; an integrator to integrate the analysis at least from theprocess in both the dedicated session and the follow-up open timeperiod; and a script updater to update at least one of the scripts forthe process according to the results of the integrator.

Moreover, in accordance with an embodiment of the present invention, thesystem also includes a de-briefer to collect user feedback informationabout the system, the at least one script and the dedicated session andfollow-up open time period and where the information analyzer includes adecision maker to update at least one of the scripts for the processbased on at least one of the integrated analysis and post sessiondebriefing from the de-briefer; and a machine learner to update at leastboth of the scripts for the process based on subject data from any ofthe scripts, subject data from multiple subjects using any of thescripts and multiple subjects using scripts similar to any of thescripts.

Further, in accordance with an embodiment of the present invention, thenon-wearable element is at least one of: a screen and a camera.

Still further, in accordance with an embodiment of the presentinvention, the wearable element is at least one of EEG, HRV, EMG, GSR,ECG, PPG.

Additionally, in accordance with an embodiment of the present invention,the script handler includes a script runner to run the at least onescript and a script updater to update the scripts from updates from themachine learner, the decision maker and the integrator.

Moreover, in accordance with an embodiment of the present invention, thesystem also includes an event handler defining events to be responded toand an output deliverer to activate at least one of: a direct physicaleffect (DPE) activator, a media presenter, earphones and a wearablescreen according to the scripts and in response to the events.

Further, in accordance with an embodiment of the present invention, theinformation analyzer includes at least one of: a media handler to handleat least delivery of media to the subject and selection and adaptationof media segments; a neurological handler to receive neurologicalreadings and to analyze a neurological state of the subject based atleast on the neurological readings; a behavior handler to monitormovements of the subject to analyze his/her behavior, to recognizegestures and to detect indicators of the psychological state of thesubject; and an environment calculator to determine the state of anenvironment of the subject and at least to remove its effect in anyreadings utilized by the handlers.

Still further, in accordance with an embodiment of the presentinvention, the system also includes a script manager including at leastone of: a script compiler to compile initial scripts; a script simulatorto simulate an expected operation of a script; and an A/B test runner ofthe scripts to test alternate versions of the scripts before finalizingthem.

Moreover, in accordance with an embodiment of the present invention, theoutput is at least one of: a stimulus, a media element and aninstruction.

Further, in accordance with an embodiment of the present invention, theprocess includes at least one of: hypnosis, meditation, psychoanalysis,psychotherapeutic handling, pregnancy support, combined therapies andnerve stimulation.

Still further, in accordance with an embodiment of the presentinvention, the script runner transitions to a new state upon receipt ofan indication of at least one of: sleep stage synchronization;pre-defined neurological states, pre-defined physiological states,timing, including calculation based on desired session length andremaining time and an intervention by at least the subject.

Additionally, in accordance with an embodiment of the present invention,the script runner transitions to a new state upon receipt of an analysisbased on at least one of: user profile information, explicit subjectfeedback, subject's cognitive or neurological state, neurological statereading, physiological sensors reading, subject behavior detection,post-session feedback from the subject and information from othersubjects.

Moreover, in accordance with an embodiment of the present invention,each transition has a transition probability associated therewith andthe script updater updates the transition probabilities.

Further, in accordance with an embodiment of the present invention, thesystem also includes a neuro-linguistic programming (NLP) analyzer toutilize NLP-based analysis of the subject's communication with theenvironment to support the progress of the subject towards his/herdesired goals.

Still further, in accordance with an embodiment of the presentinvention, the storage unit, script handler, information analyzer,integrator and script updater and de-briefer are implemented on aclient/server system.

The methods implement the steps of the system.

BRIEF DESCRIPTION OF THE DRAWINGS

The subject matter regarded as the invention is particularly pointed outand distinctly claimed in the concluding portion of the specification.The invention, however, both as to organization and method of operation,together with objects, features, and advantages thereof, may best beunderstood by reference to the following detailed description when readwith the accompanying drawings in which:

FIG. 1 is a schematic illustration of cognitive state monitoring andalteration system incorporating feedback technologies constructed andoperative in accordance with a preferred embodiment of the presentinvention;

FIG. 2 is a schematic illustration of the elements of the globalanalyzer of FIG. 1, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 3 is a schematic illustration of the use of system of FIG. 1 duringan in session phase; constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 4 is a schematic illustration of the use of system of FIG. 1 duringan out of session phase; constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 5A is a schematic illustration of the elements of the client hub ofFIG. 1, of the use of system of FIG. 1, constructed and operative inaccordance with a preferred embodiment of the present invention;

FIG. 5B is a schematic illustration of the elements of the scripthandler of FIG. 5A, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 5C is a schematic illustration of the elements of the outputdeliverer of FIG. 5A, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 5D is a schematic illustration of the elements of the informationanalyzer of FIG. 5A, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 5E is a schematic illustration of the elements of the setup/confighandler of FIG. 5A, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 5F is a schematic illustration of the elements of the scriptmanager of FIG. 1; constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 6 is a schematic illustration of the use of system of FIG. 1 withexternal systems, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 7 is a schematic illustration of the different modes of interactionof the wearable and non-wearable elements of FIG. 1 with a user;constructed and operative in accordance with a preferred embodiment ofthe present invention;

FIG. 8 is a schematic illustration of the elements of the media handlerof FIG. 5A, constructed and operative in accordance with a preferredembodiment of the present invention;

FIG. 9 is a schematic illustration of the elements of the behaviorhandler of FIG. 5A, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 10 is a schematic illustration of the elements of the neurologicalhandler of FIG. 5A, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 11 is a schematic illustration of the flow of sensor inputinformation in the system of FIG. 1, constructed and operative inaccordance with a preferred embodiment of the present invention;

FIG. 12 is a flowchart of the different phases of the system of FIG. 1for each session and for out of session use, constructed and operativein accordance with a preferred embodiment of the present invention;

FIG. 13 is a schematic illustration of the elements of the script designsystem of FIG. 1, constructed and operative in accordance with apreferred embodiment of the present invention; and

FIG. 14 is a schematic illustration of the structure of a scriptexecuted by the system of FIG. 1, constructed and operative inaccordance with a preferred embodiment of the present invention.

It will be appreciated that for simplicity and clarity of illustration,elements shown in the figures have not necessarily been drawn to scale.For example, the dimensions of some of the elements may be exaggeratedrelative to other elements for clarity. Further, where consideredappropriate, reference numerals may be repeated among the figures toindicate corresponding or analogous elements.

DETAILED DESCRIPTION OF THE PRESENT INVENTION

In the following detailed description, numerous specific details are setforth in order to provide a thorough understanding of the invention.However, it will be understood by those skilled in the art that thepresent invention may be practiced without these specific details. Inother instances, well-known methods, procedures, and components have notbeen described in detail so as not to obscure the present invention.

Applicants have realized that there are a number of limitations withexisting systems known in the art as described herein above. Forexample, existing systems use a fixed (and limited) model of thepossible trance types/hypnosis levels, whereas different scenarios anddifferent subjects may require the use of different (and personalized)models, level sets or progressions of levels.

Existing systems also use a limited model (e.g. simple thresholdcomparison) when analyzing EEG, and are limited in their integration ofEEG data with other physiological or physical data (such as Heart RateVariability (HRV)).

Existing systems handle the in session period only, and do not includean out of session supporting component or integrate information betweenthe two periods.

Furthermore existing systems have no measured information about theeffectiveness of the induced suggestions (e.g. actual amount of smokingfollowing an anti-smoking suggestion). It will also be appreciated thatrelying on subject-provided feedback may be problematic, as the subjectmay, for example: be biased, be unable to remember the information, beunable to provide objective or precise feedback (e.g. stress levels) orbe unable to directly sense the required information (e.g. out ofsession blood pressure levels).

Furthermore, existing systems do not have the ability to interact withthe user during the out of session period (e.g. through out of sessionsuggestion re-activation or re-enforcement).

In general, existing systems are typically adapted to in sessionstationary use only. In particular, existing systems include a limitedset of sensor inputs which are only suitable for in session use. It willbe appreciated that the sensors which measure specific physiologicalparameters during in session stationary use may be vastly different thanthe sensors which measure the same physiological parameters during outof session period (e.g. when the subject is walking or is generallyoutdoors).

Existing systems do not support integration of session stages withspecific sleep stages, so to make the best use of enhancedsusceptibility during some sleep stages, or of deep hypnosis levelswhich can only be accessed going though specific sleep stages.

For example, U.S. Pat. No. 8,517,912 entitled “Medical Hypnosis Devicefor Controlling the Administration of a Hypnosis Experience” issued 27Aug. 2013 teaches a single medical hypnosis device for controlling theadministration of a hypnosis session together with processing means forcomparing the received physiological feedback data with predeterminedphysiological data to detect a change in a neurological state of theuser.

Applicants have further realized that the above mentioned limitationsmay be overcome by a system consisting of multiple, dynamicallyconfigurable cooperating wearable and non-wearable elements which arealso connected to a main server facility. The system includes a varietyof instruction/stimuli delivery options, sensors and direct physicaleffect generation elements (e.g. vibration or temperature change). Thesystem may further connect to external systems to provide additionalfunctionality. The system may also implement a comprehensive frameworkfor use of CSA techniques, which includes integrated interactionsspanning both in session and out of session periods.

Furthermore, the system may be guided by scripts which run during the insession and out of session periods, using a sophisticated intelligentscript engine. The scripts may run locally (after being downloaded orstreamed to the user), or in conjunction with a server as furtherdetailed below.

The system may use a variety of sensors, and an accumulating database ofinformation about the current user (as well as other users), so toaccurately assess the user's state at any time. This assessment mayprovide the scripts and the script creators with information helpful indelivering the relevant instructions correctly and with the righttiming. The system may also provide information about the user's stateand activities which can be used by the script to find the best way toreach the user's goals—therapeutic, behavior modification or otherwise.

Furthermore, the system may analyze the sleep stages of the user (whenused during sleep within both in session and out of session periods),and allow scripts to be synchronized to the sleep stages. This may beuseful for sleep-stage based session (in session use), automatic sessionactivation during the user's sleep based on the specific sleep stage(e.g. “teach me language X when I reach a given sleep stage Y”) andsleep-stage based suggestion activation (out of session use).

It will be appreciated that the scripts may also communicate with theserver to provide data sharing and implement the resulting server-basedanalysis results while maintaining the user's privacy.

Reference is now made to FIG. 1 which illustrates a cognitive statemonitoring and alteration system incorporating feedback technologies 100in accordance with an embodiment of the present invention. System 100may comprise system server 10, a client system 25 and a script designsystem 50. Client system 25 may further comprise a client hub 20 andassociated wearable elements 60 and non-wearable elements 65 asdescribed in more detail herein below.

System server 10 may further comprise a server coordinator 120, aninformation processor 130, a designer store 150, a user script store160, a script manager 170 and a billing manager 180. Informationprocessor 130 may receive, collate and analyze all data from clientsystem 25 and may further comprise a data communicator 131, a serverdata coordinator 132, and a global analyzer 134. Global analyzer 134 mayfurther comprise an integrator 137 and a server ML engine 136 as isillustrated in FIG. 2 to which reference is now made. The functioning ofthese elements is described in more detail herein below.

It will be appreciated that system server 10 may also be connected to adatabase 140. Database 140 may store user information, scripts and mediacontent together with results of the various wearable and not wearableelements for use by decision maker 2067 and server ML engine 136 asdescribed in more detail herein below. Database 140 may also storemetadata attributes to all content types described above.

System server 10 may be a set of one or more central servers whichcollect information from multiple users, provide scripts and contentsegments, and allow the update of user database 140 with gathered userresponses to scripts and content segments. System server 10 may receivedata about user 5 and his state during multiple in session and out ofsession periods as collected by numerous user client hubs 20, and mayanalyze and integrate this information to make decisions regarding thecurrent treatment and to provide further information and guidance to thelocal scripts as discussed in more detail herein below.

Client hub 20 may be any form of composite or virtual client or may be aphysical client such as a desktop computer, mobile device, laptop etc.In an alternative embodiment, client hub 20 may also be built intowearable and non-wearable devices as discussed in more detail hereinbelow.

It will be appreciated that system 100 may be implemented in a number ofembodiments which differ in the way the workload is divided betweenserver 10 and client system 25 as discussed in more detail herein below.The preferred embodiment may depend on the balance between processingpower and communication: the availability of strong processors with lowpower consumption (i.e. for use within multiple wearable elements 60) onone hand, and the availability of low-latency high-speed wirelesscommunication on the other hand. If strong processors are available,client system 25 may take on additional functions. If low-latencycommunication is available, server 10 may take on additional functions.

Client hub 20 may communicate with a user 5 who may be connected to oneor more wearable 60 and non-wearable elements 65 as described in moredetail herein below. Client hub 20 may collate and analyze readings fromwearable 60 and non-wearable elements 65 (such as such as UI inputmeans, script responses, neurological and physiological informationreading, motion and behavior detection) and any other sensors for use bythe pertinent script as described in more detail herein below. It willbe appreciated that these wearable 60 and non-wearable elements 65 maycommunicate with client hub 20 via different local communication andinterconnection means such as Wi-Fi, Bluetooth etc. It will also beappreciated that both wearable 60 and non-wearable elements 65 may alsocommunicate directly with server 10 bypassing client hub 20 usingbuilt-in communication technology.

In an alternative embodiment to the present invention, client system 25may also communicate with external client-side systems 30 (such as asmart home system) which may interact with a user 5 in a variety of waysas discussed in more detail herein below. System server 10 may alsoconnect to various external systems 40. Such external systems 40 mayinclude, for example, medical information systems or Internet datasources.

It will be appreciated that server 10 may collate and store data aboutusers and sessions and may analyze this data to modify scripts wherenecessary and to provide session support where necessary. As discussedherein above client hub 20 may run the scripts during sessions and mayreceive and analyze feedback from the wearable 60 and non-wearableelements 65 during the sessions.

It will be appreciated that in a typical embodiment, client hub 20 maymanage the interaction with user 5 (through wearable 60 and non-wearableelements 65) without communicating with the system server 10continuously, and may interact with system server 10 mostly at specifictime points (such as the start and end of sessions, between specificsession phase and at specific points during the out of session period).Thus, user 5 may use client system 25 even if it can't communicate withthe system server 10, or if such communication is intermittent.

Reference is now made to FIG. 3 which illustrates an exemplaryarchitecture of client system 25 as used during an in session setting.As discussed herein above, client system 25 may comprise multiplewearable 60 and non-wearable elements 65 connected through acommunication medium 99 (which could be based on several wirelesscommunication method such as Bluetooth, Bluetooth Low-Energy (BLE) orothers). The communication medium 99 may also include multiplecommunication methods (such as BLE for communication between wearable 60and non-wearable elements 65 and the body-area network for communicationbetween the wearable elements 60A (headband), 60B (armband) and 60C/60D(two belt-wearable units). Some of the wearable elements 60 may beconnected directly (such as 60C and 60D, both of which connect to thesame belt). Some of the wearable elements 60 (such as the headband 60Aand one of the non-wearable elements 65B (a screen to present media,system UI and stimulus) may be connected to the Internet to allowinteraction with the systems server. One of the external client sidesystems 30 may also be an environment detector 30A which also detects(and possibly affects) the environment of user 5 (e.g. detecting theheat and humidity in the room, and possibly affecting them bycommunicating with a smart house infrastructure). Non-wearable element65A may also perform monitoring (e.g. through a video camera) of user 5(for example) for motion detection, facial expression reading etc.

Reference is now made to FIG. 4 which illustrates an exemplaryarchitecture of client system 25 as used in an out of session setting.As is illustrated, the client-side only wearable elements 60A(headband), 60B (armband) and 60C (belt-wearable unit)], all of whichare connected through communication media 99. Wearable element 60A(headband) may be intermittently connected to the Internet (typicallythrough cellular internet communication) and may serve as acommunication gateway for the entire client system 25.

It will be appreciated that the system 100 elements used in an out ofsession setting are typically a subset of the elements used in the insession setting (with some elements possibly replaced due to reasonssuch as convenience of use or aesthetics). The reverse scenario (inwhich additional elements are used in out of session compared to insession) is less likely, though it may occur, e.g. if the out of sessionactivity is a sports activity, and the user uses a number of specializedsports performance measurement wearable elements 60 integrated with thesystem.

Data communicator 131 may receive data from client system 25 (gatheredinformation from wearable 60 and non-wearable elements 65), possiblyincluding pre-session, mid-session or end-session data), servercoordinator 132 may coordinate between the elements accordingly, globalanalyzer 134 may analyze the received data accordingly includingintegration of data from different sessions and elements for user 5 aswell as other gleaned information from other users. Decision maker 2067may make decisions regarding therapy accordingly and learning engine 137may glean useful information from pertinent sessions and data held indatabase 140 (for user 5 and other users from their sessions).

Reference is now made to FIG. 5A which illustrates the elements ofclient hub 20. Client hub 20 may comprise a script handler 201, a clientcoordinator 202, an output deliverer 203, an information receiver 204,an event handler generator 205, an information analyzer 206, aphysiological and behavioral abstractor (PBA) 207, a local database 208,a setup config handler 209 and a post-session de-briefer 210.

Reference is now made to FIGS. 5B, 5C, 5D 5E and 5F which illustrate theelements of script handler 201, output deliverer 203, informationanalyzer 206, setup config handler 209 and script manager 170accordingly.

Script handler 201 may further comprise a script runner 2011, a scriptupdater 2012 and a script controller 2013, a client script verifier 2014and a security/privacy manager 2015.

Information analyzer 206 may further comprise a media handler 2061, aneurological handler 2062, a behavior handler 2063, an environmentalcalculator 2064, a client ML engine 2066 and a decision maker 2067.Environmental calculator 2064 may further comprise a noise adjuster2065.

Reference is now made to FIG. 5F which illustrates the elements ofscript manager 170 which may further comprise a script compiler 171, ascript simulator 172, an A/B test runner 173, a server script verifier174, a security privacy manager 175 and a media pre-analyzer 176.

Output deliverer 203 may further comprise a sensor activator 2031, adirect physical effect DPE activator 2032 and a media presenter 2033.Setup config handler 209 may further comprise a user profile builder2091, a baseline calculator 2092, a system tester 2093 and a usertrainer 2094. The functioning of these elements is described in moredetail herein below.

Script designer system 50 may communicate with system server 10 toupload scripts, related media and script updates. Script designer system50 may also communicate with client system 25 to provide supportservices or premium services (such as direct professional humanintervention) as described in more detail herein below. Script designersystem 50 may further comprise a script designer interface to allownon-technical users such as psychologists to create scripts which handlethe complex interaction and analysis. Script designer system 50 may be astandalone client system (as illustrated in FIG. 1), a server basedsystem (in which the script designer system 50 is implemented on thesystem server 10 and accessed through a browser or other client-sideagent software) or a combined client-server system (in which thefunctionality described above is divided between script designer system50 and system server 10). An example of the last embodiment may be ascript design or editing mobile app installed on mobile devices andcooperating with system server 10 hosted infrastructures.

Designer Store 150 may allow user 5 to purchase system 100 providedscripts. User script store 160 may allow a user to purchase an externalscript from an external supplier to be used with system 100 in the samemanner as the in-house scripts described in more detail herein below.

As discussed throughout, the primary interaction between user 5 andsystem 100 is guided by scripts which control various aspects of thefunctionality of system 100 and drive the dialog with user 5. Thesecontrolled aspects may include session management, instruction delivery,stimuli (media) delivery, sensor input handling, concept recognition,direct physical effect generation, user input reading, user actiondetection, user behavior recognition and bidirectional client to servercommunication (including in particular saving of collected user 5information, server instructions, script updates and system updates).

During an in session period, this interaction is managed in a structuredmanner, following a script which may be structured as a transition graphconsisting of nodes and edges. Nodes may represent activities of thesystem, which may include delivery of stimuli and instructions. Edgesmay have transition probabilities associated with them, which determinethe probabilities of transition between the nodes linked by the givenedge. Nodes and edges are discussed in more detail herein below.

In one embodiment (server-centric), all script running and informationprocessing is performed by system server 10. The various elements ofclient system 25 only provide the direct input and output to the user(and low-level signal processing as described above).

In another embodiment (client-centric), script running and informationprocessing is mostly performed by client hub 20. Client hub 20 maycontact server 10 at specific points (e.g. start/end of session) toreceive updates to the scripts as well as an update to the script'stransition probabilities based on a one-shot analysis of the currentuser information against the information collected in the systemdatabase 140. On-going analysis and transition probability modificationis be performed by client-side information analyzer 206. Client hub 20may synchronize local data 208 with database 140 at certain time pointsso (for example) to provide backup and persistence as noted above.

In yet another embodiment (client-server), script running andinformation processing is performed by client hub 20 in conjunction withserver 10. During each node execution (as described above), client-sidescript updater 2012 may contact server-side global analyzer 134, provideit with processed user info (e.g. latest EEG, motion detection and othersensor readings) and receive updated transition probabilities for therunning script. Client hub 20 may also contact server 10 for databasesynchronization as noted above.

If communication is not available, script updater 2012 would still beable to use the transition probabilities provided originally with thescript (as updated during the last communication with server 10), andconsult information analyzer 206 to provide the best known values.

In all of these embodiments, the processing for out of session periodsis be similar, but would be applied to the script segment activated dueto association with events managed by the event handler/generator 205.

Thus system 100 may provide the underlying functionality and hardwareinterfaces (e.g. stimulus delivery, sensor input) and higher-leveldecoding and analysis of the received inputs, including high-levelfunctions such as behavior recognition and concept reading. The scriptmay only be provided with the processed/analyzed information, and is notgiven access to the low-level/raw EEG or other data. It will beappreciated that scripts may be based on transition graphs (as discussedin more detail herein below and the information analyzer 206 and PBA 207may provide the required decision making information accordingly.Furthermore, in typical embodiments, the analysis of information relatedto other users (for the benefit of the current user) is typicallyperformed by server-side information processor 130—so as not to exposemultiple user information through external communication links to clientsystem 25.

As discussed herein above, the interaction of user 5 with the system 100is conducted during in session and out of session periods. During an insession period, the interaction is managed in a structured manner,following a script which may be structured as a transition graphconsisting of nodes and edges. Nodes may represent activities of thesystem, which may include delivery of stimuli and instructions. Edgesmay have transition probabilities associated with them, which determinethe probabilities of transition between the nodes linked by the givenedge.

Client coordinator 202 may also facilitate the downloading of the scriptand its related media to the client hub 20 and manage storage space andits optimization on the relevant elements. Client coordinator 202 mayalso interact with user script store 160 (to allow user 5 to acquire newscripts). Existing (installed) scripts may reside on the (client-side)local database 208, or in an area allocated to the specific user on theservers data base 140 (and download on demand when required). Clientcoordinator 202 may also coordinate data collection to be stored locallyon database 208 or server side on database 140. Client coordinator 202may also handle the use of faulty elements and sensors in conjunctionwith scripts as described in more detail herein below.

System 100 also provides the communication infrastructure allowing thescript to run on multiple interconnected devices together with thecommunication and data collection channels between user 5 and the scriptdesigner.

Other functionalities of system 100 regarding scripts are persistent andmay include information retention services which allow scripts tocontinue running from session to session even with intermittent Internetand inter-component connectivity. This may also include the changingconfiguration of components from session to session which may be savedwithin the session history, including full input values from all sensorsand inputs, any required internal script information and full timinginformation. This allows, for example, a script to transfer informationfrom session to session, and from an in session to an out of sessionperiod execution, even if some or all of the system components have beenreplaced (e.g. due to malfunction, an upgrade or because the out ofsession setting requires a different and disjoint set of client system25 components).

System 100 may also limit and control script functionality including(for example) stopping scripts which exceed their allocated time. System100 may stop scripts which cause physical, emotional or psychologicaldistress to user 5 or otherwise exceed their script limitations (asdetected through the sensors), or otherwise in the case of an emergencyas described in more detail herein below.

System 100 may also deliver the interaction phases not included in thescript, such as initial system learning, pre-execution profiling andpart of the pre-session evaluation (as described in more detail hereinbelow).

System 100 may handle on-going updates. It will be appreciated thatscripts may run for very long period (esp. out of session scripts), andmay require updating, including being updated/modified while running viaupdates from server 10 (push/pull updates). System 100 may support hotswap capability (i.e. changing the script during while the script isrunning), or alternatively just store an updated version to be used thenext time the script would run (in session or out of session). System100 may also provide software component remote update capability forsystem software elements as well as script components.

System 100 may also adapt scripts to run with updated version ofunderlying software platform or hardware elements of system 100. Thismay be limited and the script developer may be required to update thescript to support some of the system updates.

It will be appreciated that the scripts themselves may define sessionstages and transitions including script-specific or user-specific stagestructures, may provide output to user 5 (such as instructions,stimulus, content and direct physical effects) based on rules andinputs, and possibly on synchronization rate sources (as discussed inmore detail herein below).

The scripts may also implement high-level functionality and planning,including taking care of session time constraints (and planning timeallocation for session stages accordingly).

The scripts may provide high-level user goal management and progresstracking, including providing feedback and displaying the relevantmanagement and motivational UI (e.g. “you're doing great—3 more sessionsand you'll overcome your XYZ problem”).

It will be appreciated that scripts may implement multiple goals and maytransition between goals (including different “progress ladders” ineach). For example, a smoking cessation can become a stress reliefscript (when required), as system 100 does not control the type oftreatments that scripts are created for.

The scripts may implement parameters and functions that are specific toone goal, as well as parameters and functions which are related to theentire script functionality (including its multiple goals).

It will be appreciated that system 100 may be offered to a user 5 in theform of a kit. User 5 may decide which type of program he is interestedin purchasing such as a program to lose weight, to stop smoking, toincrease concentration etc. The kit may comprise of one or more wearable60 or non-wearable 65 elements together with the appropriate scripts torun the program and the means to monitor effects including detection ofbehavior where necessary and to administer direct physical effects wherenecessary. It will be appreciated that the scripts may control variousaspects of system 100 during both in session and out of periods. Forexample, a smoking cessation program may include a script thatadministers an electric shock or a specific hypnotic trigger activationstimulus when it senses the motion of cigarette being raised to themouth using an appropriate element.

As discussed herein above, client system 25 may comprise a set ofcooperating, wearable elements 60. Wearable elements 60 may includeappropriate output devices and sensors used to interact with user 5,i.e. that may deliver instructions and media segments (stimuli) whichtogether form a hypnotic session, may track user feedback (e.g. headnodding, facial expression etc.) as well as physiological, physical andother parameters (using a variety of sensors and sensor data analysisalgorithms), and may continue user interaction and tracking outside ofthe hypnotic session and into “regular life” time period. This later outof session period may include (if needed) periods in which user 5 isawake as well as sleeping periods. The out of session interaction mayalso include system 100 related activities such as setting up system 100or providing explicit pre- or post-session feedback as described in moredetail herein below.

Wearable elements 60 may typically include but not be limited to:directly wearable items (helmet, head-band, wrist-band, earphones,glasses etc.), hand-held elements, indirectly worn elements (e.g. insidea wallet/backpack/ . . . ), being embedded inside clothing garments orother worn elements (such as cycling helmet); being embedded as ahardware module inside another wearable element 60 or embedded as anadded software functionality to another wearable element 60 (e.g. addedas application to an existing Smartphone, smart watch, Glasses, etc.using sensors of hosting wearable elements 60). Wearable elements 60 mayalso include medically-inserted implanted devices or “smart tattoos” asfurther described below.

It will be appreciated that the interaction between wearable elements 60and user 5 may also include direct physical effects applied to user 5,such as vibration, pressure, sound effect (e.g. buzzing), temperaturesensation change (hot or cold), low-voltage electrical current (asfurther detailed below) or odor generation. Such a direct physicaleffect may be applied during an in session period (e.g. to provideadditional sensory stimulus or as a feedback mechanism) or out ofsession (e.g. operating as a cue to activate a posthypnotic suggestion)as discussed in more detail herein below.

It will also be appreciated that a single wearable element 60 device mayimplement multiple functions. For example, a single integrated headbandor glasses may implement some or all of: neurological sensing, audioinput and output (including bone conduction interface for audio), speechrecording and recognition, virtual reality (VR)/augmented reality (AR)glasses (including analysis and recognition of a viewed scene and use ofresulting information by system 100 or the script) and pupil and or iristracking (e.g. pupil dilation measurement, blinking rate measurement andgaze direction detection). A wearable element 60 may also implement avibration direct physical effect; a temperature change direct physicaleffect, inertial sensors to detect head motions (e.g. nodding of thehead) as well as general body position (e.g. vertical or horizontalposition) and bio-physiological sensing electrodes (for Galvanic SkinResponse (GSR), Electromyography (EMG), etc.)

It will be further appreciated that wearable element 60 may alsocooperate with other external elements (such as a separate PC, laptop orsmart-phone) which provide additional communication services, computingpower, storage, display or other capabilities also known as non-wearableelements 65.

Wearable elements 60 may also cooperate with non-wearable elements 65which provide additional capabilities, e.g. an external camera pointedat user 5 which performs motion detection and allow for motion-relatedinteractions (e.g. evaluating the user's response to a “please lift yourarm” suggestion). Such an external camera may also provide hints forsignal noise reduction to system 100, by notifying system 100 of themotion of user 5 allowing system 100 to filter out any muscle movementrelated artifacts and signal noise.

It will be appreciated that system 100 may require different wearableelements 60, wearable elements 60 models or wearable elements 60configurations during different usage periods (e.g. during in session,regular awake period, sport activity or sleeping). For example, aheadband which can be using during an in session and later an out ofsession sports activity may not be convenient enough for use duringsleep, and would be replaced with a specific armband (designed so to beconvenient enough for use while sleeping). User 5 may even desire toswitch between different wearable elements 60 due to personalconsideration, e.g. different wearable elements 60 which suit theappearance of user 5 in different social settings.

It will be appreciated that some wearable elements 60 may work best whenprecisely adapted to the specific user's body structure. A notableexample is an earphone wearable element 60 which works best when adaptedto the specific user's ear or ear canal structure. Such adaptation mayimprove (for example) the convenience of wearing, the ease of insertionand removal and the acoustic quality of the earphone.

In an embodiment of the present invention, an earphone wearable element60 may include additional functions, such as sensor functions (e.g. EEG,blood pressure, heart rate, accelerometer/gyro etc.) or direct physicaleffect generation functions. Such functions may also benefit frombetter, closer or more precise placement of the functional element (e.g.the sensors' active element or electrodes) against the body of user 5providing better connection with the body.

It will be appreciated that all of the above applies to additionalwearable element 60 categories, and also to earphone wearable element 60sets (e.g. two earphones which should both be individualized).

Thus, the system 100 vendor may offer the option to purchase anindividualized version of a given wearable element 60. Such anindividualized version may include the entire wearable element 60, orjust a sub-element of wearable element 60 (e.g. a framework, connectoror carrier sub-element), with the main element being common to allversions of wearable element 60. The personalized element may in fact bethe actual electrode(s) touching the user's skin, which may provide abetter measurement profile.

The system 100 vendor may offer a completely individualized wearableelement 60 or a selection from a series of possible predefined designs.The system 100 vendor may determine the individualized wearable element60 based on some form of scanning of the related body member on/in whichthe individualized wearable element 60 is to be worn or used. Suchscanning may include photography (including multi-angle photography) or3D scanning or physical measurement. The scanning may be performed bythe user himself (sending the results to the system's vendor), or in apredefined scanning and fitting location.

The system 100 vendor may provide the individualized wearable elements60. In addition, third party vendors may provide additional wearableelements 60, including both hardware and software support for thathardware (such as drivers and interfaces). The system 100 vendor orthird party vendors may also create detailed designs and send them tothe user, to be created using 3D printing or similar technology.

The same individualization technology may be used to personalizewearable elements 60 in other ways, such as color, shape, design, size,material etc. Such personalization may also support the functionality orquality of the wearable elements 60, but may also have other purposes,such as resolving issues related to allergies to specific materials,making the wearable elements 60 design and color a better fit to otherelements worn by the user etc.

Wearable elements 60 and non-wearable elements 65 may be implementedusing a specialized hardware platform (as discussed in more detailherein below) which includes some of the required sensing, processing,storage and communication capabilities.

They may also be implemented using a hardware add-in to existingcommercially available devices which include hardware add-in capability,such as the modular phones designed by Google's project ARA (found atwww.projectara.com). Such a hardware add-in may typically includeassociated software as well.

Wearable elements 60 and non-wearable elements 65 may also beimplemented using software implemented on existing commerciallyavailable wearable, luggable or off-body computing devices (e.g. aprogrammable sport watch, smart phones, laptop, PC, web camera etc.).Such software may exploit (and be adapted) to the specific sensorsincluded in the pertinent element, such as the inertial sensors includedin smart phones or the heart rate sensors included in some sportwatches.

Another method of implementation is by using medical implants providingspecific functions to the user's body. The implants may interface withsystem 100 through wireless communication, physical (wired) connectionor some form of body conductivity.

It will be appreciated that different elements may implemented in any ofthe different ways as discussed herein above (specialized hardware,hardware add-on, software etc.), so that a specialized head-band (forexample) may be used together with a software-extended sport watch.

Some of the elements may require other elements to operate, e.g. aminiaturized sensor element might include limited functionality anddepend on the use of a specific armband to provide the additionalprocessing and storage required for it to operate.

Different wearable element 60 configurations include different sensors,e.g. to help the user resolve different issues. For example, clientsystem 25 may include a wearable element 60 configured with differentversions of a gas detection sensor, aimed at detecting smoke (for userstackling a smoking problem) or alcohol (for users tackling a drinkingproblem).

The elements may be connected in a variety of ways including via aphysical connection, e.g. a headband component may be physicallyconnected (via wires) to an additional electrode component whichprovides additional EEG reading information.

They may also be connected via a wireless connection, using anycombination of protocols such as Wi-Fi, Bluetooth, and Bluetooth LowEnergy (BLE).

Another form of connection may be communication based on bodyconductivity, i.e. using the body of user 5 as a communication medium.

Such connectivity may occur directly between elements (e.g. peer-to-peeror mesh topology), or though some of the elements acting ascommunication hubs (e.g. star topology). More specifically, clientsystem 25 elements may serve as low energy inter-sensor communicationfor different wearable 60 and non-wearable elements 65. This can beachieved, for example, using communication based on the ZigBee wirelessspecification (as published by the ZigBee alliance at www.zigbee.org),or using wireless sensors implementing the ANT+ protocol (as describedin https://en.wikipedia.org/wiki/ANT%2B). The choice of protocol andtopology may also be affected by power management considerations, e.g.which of the elements has sufficient power to act as communication andprocessing hub.

It will also be appreciated that system 100 may be used in conjunctionwith external client side systems 30 which provide additional data,sensing capabilities and other services but are not a part of theregular system 100. These may be wearable or non-wearable systems.

It will be appreciated that external client side systems 30 may also beintegrated into system 100, with the client system 25 elements (wearableelements 60 and non-wearable elements 65) serving as a hardware platformand with the third party solution devices extending the platform. Forexample, a third party may provide a specialized pressure device(applying different degrees of pressure to a skin region) which isattached or connected to system 100. Client system 25 may provide astandard API which allows such a device to be used by scripts running onit.

In particular, system 100 may interface with any of the followingexternal systems 40 and external client-side system 30 and support anyof the following applications for their use as described below andillustrated in FIG. 6 to which reference is now made.

External system 30/40 types Used for Medical diagnosis systemsAdditional user measurements. Baseline user physiological data (e.g.baseline EEG/EKG information). User's genetic information - to add touser's profile information. Medical information systems User's profileinformation. User's medical history/profile; Historical physiologicalmeasurements. Sport and fitness equipment (e.g. Sensor platform, e.g.heart rate, sport watch) motion detection. Current sport activitytracking, e.g. what is the current sport activity being undertaken, whatare the current activity parameters (e.g. activity start time, metersrun, total climb/descent etc.). External camera, e.g.: Gesture detectionfor system Smartphone cameras. interaction. Security cameras. Motiondetection. Desktop video conferencing/chat Behavior recognition. camera.Body language reading. Cameras embedded in game Face recognition.consoles. Facial expression reading. Cameras embedded in smart TV's. Eyemotion detection - including gaze direction, focus, blinking, pupildilation etc. External microphone (in Voice recognition. Smartphone etc.Voice feedback. as above). Voice command/response. Voice analysis.Physiological sensing - breathing rate, heart rate. External audio/videodisplay Script output (instructions, stimuli/ systems, e.g.: contentsegments). External speakers. System UI presentation - includingExternal earphone/headset systems. visual & voice prompts. Phonesystems. Home audio systems. TV sets. Car sound systems. Car navigationsystems. Car HUD displays. External network-connected Internetconnectivity gateway. devices (e.g. PC, Laptop, Added processingsupport. tablet, mobile). Touch-based input. Shared experience hub -allowing multiple users to use cooperating scripts. This could be in asingle or multiple locations. External computing devices (as Internetconnectivity gateway. above). Added processing support. Storageservices - for collected information which can't be uploaded to servers(e.g. due to intermittent Internet connection). Smart environmentalelements (e.g. Detecting environmental interactions smart home, Internetof Things e.g. interface with a smart refrigerator devices) (so todetect when the user is opening the refrigerator) for a dieting script.Maintaining continuous area monitoring, e.g. using a smart home internalnetwork so to monitor users' smoking habits via multiple cameras andsmoke detectors in the house.

It will be appreciated that the connection between client system 25 andexternal client side system 30 may typically be wireless, through insome cases it could be direct or internet-based connections (e.g. usinga web service). The connection with external systems 40 may typically bedirect or internet connected.

Such connections may use standard protocols supported by externalsystems, such as the specialized Bluetooth profiles used for health-care(e.g. BLP Blood Pressure Profile) or sport and fitness (e.g. CPP CyclingPower Profile).

Such communications may be real-time (i.e. the external system isintegrated into the process performed during one of the operatingmodes), or may be non-real-time (such as data exchange with an externalsystem which provides additional data about the user but is not involvedin the actual processing sequence).

The communication is usually performed at the client side (e.g. for thespecific use) but may also be performed on the server side (with systemserver 10 acting as an intermediary to the external system 40).

It will be appreciated that some of the functions mentioned in the tableabove are low level functions, and some are higher level function builton top of the lower-level functions. For example, behavior recognitionis a high-level function which relies on the lower-level motiondetection.

In some of the cases above (e.g. the smart home scenarios), system 100may need to receive preliminary authorization keys, receive informationfrom the external systems 30 or 40 (regarding the availability ofcameras, sensors and other relevant devices), build an internaldescription/map of the relevant devices and connect to these deviceswhen required (so to protect the privacy of other people which visit thesame spaces as user 5).

As discussed herein above system 100 may be used with different elementconfigurations at different times (in session and out of session) andwith different operating modes, e.g. using different sets of elementsduring a hypnotherapy session, during sleep, during a sports activityand during everyday life.

Thus system 100 may continue to operate and use and update the sameunderlying database 140, even when user 5 (for example) removes theelements adapted to one mode of operation (wearable elements 60 ornon-wearable elements 65) and uses a different set of elements adaptedto the new mode of operation.

It will be appreciated that some embodiments of the present inventionmay require a specific master element to be used in these multipleoperation modes so to implement such operational persistence. Otherembodiments may support a mode of use in which there are no commonelements between the different sets of elements. For example, the set ofelements used during a session may be completely disjoint from the setof elements used during sports activity. However, system 100 may stillprovide persistence and continuity of operation between the differentmodes of use.

It will be appreciated that in order to achieve this, different system100 elements may include synchronization and “hand over” functionalityimplemented via the communication methods connecting the elements, sothat an element set used in a given operating mode may continue from thepoint in which a previous element set has finished (i.e. the “old”elements hand over control and synchronize with the “new” elements viathe element-to-element communication).

This should not require synchronization via system server 10, as thecommunication with system server 10 may be intermittent (as discussedherein above) and may not be available when the switch-over isperformed. However, the system 100 may also offer server-basedsynchronization when server connectivity is available during theswitch-over process.

Furthermore, client system 25 should assume the Internet connectivity isalways intermittent, in particular in out of session mode. Thus, system100 may provide the required caching and other mechanism so to functionoff-line and only use Internet connectivity when available.

As discussed herein above, client system 25 may implement multiple typesof system to user interfaces i.e. channels through which system 100interfaces with user 5 (e.g. for information/stimuli presentation ordirect physical effect generation) and user 5 interfaces with clientsystem 25 (e.g. for user 5 input, user information gathering or usersensing).

Such interfaces may be two-way (forming complete interactions orfeedback loops) or one-way. They may include explicit interfaces (e.g.audio stimulus played through earphones, a vibration applied to the useror skin temperature reading through an attached sensor) as wellnon-explicit ones (e.g. subliminal message embedded inside a videosegment stimulus).

The interfaces may be implemented by one or more wearable elements 60(e.g. headband sensors) or non-wearable elements 65 (e.g. an externalcomputer displaying a system UI or an external video camera used foruser motion detection). A given interface functionality may beimplemented through different elements (with the same or differentlevels of capability). For example, user motion detection may beperformed using a camera setup in a stationary, in-house in sessionsetting. The same functionality (but at different level of capability)may be provided by a motion detecting bracelet worn by user 5 during asport activity out of session period.

It will be appreciated that interfaces may integrate multipletechnologies, possibly implemented using multiple elements. Further tothe example above, analyzer 206 may perform user motion detection bycombining information from an external camera with that provided by amotion detecting bracelet. As another example, system 100 may deliveraudio stimuli through a combination of external speakers (which provideambient background music) together with specific instructions andstimuli provided by dedicated earphones.

As discussed herein above, different operating modes (in session, out ofsession/sleeping, out of session/sport, out of session/social etc.), andthe specific combination of system elements (wearable elements 60 andnon-wearable elements 65) used in each mode may dictate specificinterfaces and interface technologies.

Reference is now made to FIG. 7 which illustrates some of the ways inwhich the client system 25 (consisting of client hub 20, wearableelements 60 and non-wearable elements 65) interact with user 5. As canbe seen, client system 25 may both receive input from wearable elements60 and non-wearable elements 65 and may also provide output such asdirect physical effect generation. The different ways are also listed inthe following table which expands on the direction of information flow.

Interface type Direction From/to UI I/O User: visual (incl. VR/AR,motion based), voice (2-way - speaker/earphones + microphone), tactile,. . . Stimulus/media Output User: visual (incl. VR/AR), voice, . . .Script Output User: through media (visual, voice, . . . ) instructiondelivery DPE Output User-worn direct physical effect applier:heating/cooling element, vibration generator Sensor Input User-wornsensors: EEG, EMG, HRV . . . Gas sensor Input User worn gas sensorMonitoring Input Camera (focusing on user or environment), motiondetection (user worn/user monitoring), . . . Environment InputEnvironmental sensors: background noise, sensing humidity, vibrationsSystem sensing Input System sensors: GPS, acceleration Holograms OutputUser Implant I/O User implants - including both control of communicationimplants and reading of information gathered by implants HologramsOutput User interface Electrode Output User-worn controllable electrodescontrol External I/O system interfaces

It will be appreciated that client system 25 may typically include asuitable interface (UI) to interact with user 5. Such interaction may beadministrative (signup, registration, setup etc.) or operational(related to the in session/out of session interaction).

It will be further appreciated that this UI may be separate from theactual session delivery interaction, which is typically administered viainstructions and (media) stimuli output, and uses various input means asdetailed below. In particular, when in a trance state, user 5 istypically not capable of dealing with a regular user interface (whichtypically requires delicate manipulation of a mouse, a touch screen orsimilar UI devices).

Thus system 100 may employ different interaction modes for differentneeds and stages, including (for example) a combination of any of thefollowing:

Regular visual UI display for system elements or using externalconnected components (e.g. a connected Smartphone or Smart-TV screen) asfurther detailed below regarding visual output delivery.

Regular UI inputs (keyboard, mouse, touch-screen etc.)

Physical buttons, dials or other physical controls installed on some ofthe elements or connected external systems (e.g. a TV remote controlused to operate a connected Smart-TV).

Voice UI which may include both voice output and voice input (based onvoice command recognition or natural language processing). Such voicecommand input may be performed by microphones (including regularmicrophones as well as those based on bone conduction) built intospecific wearable elements 60 or non-wearable elements 65, or themicrophones integrated into external client side systems 30 (e.g.Smartphone or Smart TV's) which interface with client system 25. Thevoice UI input (i.e. the user's speech received by system 100) may alsobe used for voice analysis as described in more detail herein below.

Other interaction modes may be motion/gesture/facial expression based,using the detection capabilities of system 100 (as described in moredetail herein below). These may include in particular head-basedgestures (e.g. nodding, shaking or even bobble) which may be used byuser 5 in response to system prompts.

A hologram-based UI including such technologies as virtualkeyboard/touch-screen or other UI, avatar based UI etc. may also beused. Such a hologram-based UI may be highly customizable to thespecific preferences of user 5, including those gathered from any insession information recording and other calibration information. It willbe appreciated that holograms may also be used for stimulus output.

As discussed herein above, system 100 may use different methods duringdifferent user phases. It will be appreciated that the mainadministration of the CSA session is done through instructions andstimuli delivered to user 5 (together with the relevant stimulus anddirect physical effect administration as discussed in more detail hereinbelow). The instructions and stimulus are typically delivered usingvisual or audio or delivery means (discussed in more detail hereinbelow).

It will be appreciated that the delivery of the instructions and stimulimay be controlled by the relevant script acting upon informationgathered from user 5 (e.g. via analyzed voice response, motiondetection, neurological state detection, other physiological andphysical sensors, fEMG (facial electromyography) etc.) as well asadditional system information as discussed in more detail herein below.

Instructions may include general instructions which do not requirespecific execution (e.g. “feel relaxed and well rested”), directexecution instructions which direct the user to perform an action whichcan be directly measured or tracked (e.g. “lift your right arm”instruction, tracked via a motion detection capability) and directexecution instructions which direct the user to perform an action whichcannot be directly measured (e.g. “think about a beautiful outdoorlandscape you've seen recently”). For some of these instructions typestheir execution may be indirectly measured (e.g. “feel relaxed and emptyyour mind” may be correlated with specific neurological state orphysiological or physical measurement values).

Other types of instructions may be instructions which require a specificresponse (e.g. verbal or selection via gesture/gaze) that can berecorded, analyzed and possibly used in a later interaction (e.g. “Whatis your favorite color?”).

The instructions may also be related to the environment of user 5 ratherthan the user himself (e.g. “please dim the lights in the room and closeany source of background noise such as TV or Radio”). Such instructionsmay have measurable results (e.g. by light/noise detection in the givenexample) or not.

System 100 may implement multiple user state sensors in order to receivereadings and to administer stimuli. Some of these sensors detectphysiological parameters of user 5 (i.e. biophysical parameters of thebody functioning not directly under the user control) and some detectphysical parameters (i.e. physical parameters of the body movementtypically controlled by user 5).

It will be appreciated that some measured (typically physical) bodyphenomena may include both user-controlled and non-user-controlledelements. For example, hand movement may include both a conscious handgesture as well as a nervous twitch which user 5 cannot control.

Physiological sensors may include Galvanic Skin Response (GSR), BloodVolume Pulse (BVP), Electrocardiography (ECG) or Photoplethysmogram(PPG), which may record heart rate information. Physiological sensorsmay also include Electromyography (EMG), which may monitor electricalactivity of the muscles and can provide additional information regardingspecific muscle activity (e.g. for monitoring certain gestures).

Another body phenomenon is breathing rate which may be measured using achest belt to detect chest motion, through motion detection sensing ofchest motion, using Pulse Oximeter data extracted from aPhotoplethysmogram (PPG) signal and using a GSR sensor.

Other measurable phenomena are blood/oxygen level, blood pressure,body/skin temperature and various hormone levels. For example Cortisol(which is indicative of stress) can be measure in real time (e.g.measuring in the user's saliva, or in interstitial fluid (ISF) usingspecialized sensors, as described in the publication “A Realtime andContinuous Assessment of Cortisol in ISF Using Electrochemical ImpedanceSpectroscopy” by Venugopal M, Arya S K, Chornokur G, Bhansali S. SensActuators A Phys. 2011 Dec. 1; 172(1):154-160.http://www.ncbi.nlm.nih.gov/pubmed/22163154. It may also be measurableusing other skin/body embedded sensors, as well as through NIRS sensors.

Also measurable are muscle tension, detecting tension in differentmuscle groups such as face, arms and others and additional physiologicalparameters, such as these which may be measured through blood testing(e.g. done in real-time using an implant as noted below), breathanalysis or any other technique.

Physical sensors may include any of the following (although some ofthese sensors may have a physiological component):

Motion detection, the user's motion may be continuously tracked usingvideo when available (e.g. from an external camera), directly fromon-body motion sensors installed as part of the various wearableelements 60 or by using an integration of the two.

User posture detection, sensing if the user lying down, sitting etc.

Body gestures, including hands, arms, feet, shoulders etc. These mayinclude head-based feedback such as nodding, shaking or even a bobble.For example, a script may include a segment asking a yes/no question, towhich user 5 may respond with a head-based feedback. It will beappreciated that some of these feedbacks may require localization (asaccepted body signals vary from one culture to another).

Fine-grain motion detection, detecting minute motions such as fidgeting,twitching, shaking, tics etc. This may also include Restless LegsSyndrome (RLS) detection.

Facial gestures or expression (e.g. as analyzed by fEMG) which couldprovide an implicit feedback. This may include, for example, the userlaughing (providing a feedback on the currently playing audio segment),rapid blinking, sadness expression etc.

Eye motion tracking (through video or EEG), which may include trackingof open or closed eyes, eye blinking, direction of gaze, pupil dilation.

As discussed herein above, the use of multiple sensors provides system100 with opportunities to integrate the input from these multiplesensors and improve the measurement of specific physiological orphysical parameters. Furthermore, analyzer 206 may use physiologicalsensor data to verify EEG data.

For example, analyzer 206 may analyze signal information (such as EEGartifacts (known as EOG), fEMG, motion etc.) using Blind SourceSeparation (BSS) and pattern recognition algorithms, and detect some ofthe types of motion described above (e.g. blinking and eyeopening/closing, sad face, smile etc.). Thus, analyzer 206 may correlatesuch analyzed EEG information with other wearable 60 and non-wearableelements 65. The resulting information is highly useful for script eventgeneration, sleep stage detection, face expression analysis etc.

Client system 25 may also use some physiological sensors as UI means,e.g. using hand/face gestures to interact with system 100 or withspecific scripts as discussed in more detail herein below.

Furthermore the system 100 may include a gas detection sensor, aimed atdetecting gasses in the vicinity of user 5, inhaled into or exhaled (orotherwise emitted) from the body of user 5. Such a sensor may be used,for example, to detect smoke (for users tackling a smoking problem) oralcohol (for users tackling a drinking problem).

This could be a single universal gas detection sensor, or a set ofsensors adapted to specific gasses.

Such a sensor may be placed so to detect (specific) gases in the generalenvironment of user 5, or may be placed (and configured) to focus on abreath analysis of user 5 (i.e. by placing the sensor on the front sideof a headband worn by user 5). System 100 may also use multiple gassensors (placed in different positions) so to differentiate betweenresults of the breath analysis of user 5 and gas presence in the generalenvironment of user 5. For example, environmental calculator 2064 (asdiscussed in more detail herein below) may correlate the results of twogas sensors, one placed on the front side of a headband and one placedon an armband.

In particular, such a gas sensor may detect incidences of passivesmoking, and provide an indication which may be relevant to some scripts(e.g. warning the user of a smoking cessation script that he wouldbetter leave the area since the second-hand smoke in the area may bedetrimental to the user's smoking cessation effort).

It will be appreciated that client coordinator 202 may receive andrecord the information on local database 208 from some or all of theavailable sensors so to create a database of baseline sensors values forthe specific user, and may correlate this information with additionaluser and environmental information as further detailed below. Clientcoordinator 202 may also send the information to server system 10 to besaved on database 140 for use by global analyzer 134 for centralstorage, analysis against other general user information, backup and tosupport client system 25 persistence.

As discussed herein above, an EEG reading (as well as other systemsensors) requires the use of electrodes to detect electrical (or other)user 5 body activities. System 100 may use standalone electrodes orelectrodes integrated with other wearable elements 60. Furthermore,system 100 may use the enclosures or other elements of various wearableelements 60 (e.g. a metal enclosure of wristwatch) as electrodes aswell. In particular, electrode functionality may be integrated intodirect physical effect wearable elements 60 which are in contact or arein close proximity to the body of user 5.

It will be appreciated that system 100 may use personalized wearableelements 60 (matched to the specific body parameters of user 5) so toprovide the best conductivity for the electrodes. This may also includepersonalized electrodes manufactured especially to match the specificbody parameters of user 5.

System 100 may also use many types and categories of electrodes. Inparticular, improved results may be achieved by the use of active(rather than passive) electrodes. Such active electrodes include aninitial amplifier on the electrodes themselves, rather than an externalcable-connected unit. This prevents noise creation due to cables orelectrode movement.

System 100 may also use dry rather than wet electrodes. In thisembodiment, user 5 may be required to apply a conducting gel (or otherpreparation process) to the measured skin area before placing therelevant wearable element 60 and electrodes.

Such a preparation process is reasonable for limited-time use in medicalsetting. However, it is less suitable for a typical use in which theuser may be expected to be connected to wearable element 60 devices forlong period of time, in particular during out of session periods.

To improve the conductivity of dry electrodes, the pertinent wearableelement 60 may also include a mechanism to generate localized humidityat the electrode contact point. One such mechanism (co-located orattached to the electrodes) may spray a small amount of conductiveliquid (or other material such as conductive dust). Another suchmechanism may be a heat-generating mechanism which would heat the skinof user 5 to some extent, causing him or perspire, with the generatedperspiration acting as a conductive liquid. Such a mechanism may alsofunction as a direct physical effect administrator (in parallel to thedescribed functionality).

Such a heat-generating mechanism may be located next to the electrode(and the skin of user 5). It could also be located further from the skinof user 5, using the heat conducting properties of the electrode itselfto conduct the heat to skin of user 5. Either way, it is important tolimit the generated heat so to be below the sensory threshold of user 5.

Such a heat-generating mechanism may also serve as a heat (and possiblycold) generating direct physical effect administrator (as discussed inmore detail herein below).

Any such mechanism (liquid spraying, heat generating or otherwise) mayoperate continuously (e.g. whenever the electrodes are required tooperate). Output deliverer 203 may also activate any such mechanismconditionally, based on an analysis by analyzer 206 of the quality ofmeasurement provided by a given electrode, comparing against the qualityexpected from this electrode given its position on the body, electrodetype, session type, environment conditions (as described below),previous measurement quality and any other parameters.

For example, on a hot day, user 5 may be perspiring more, thus providinghigher quality measurements from the electrodes. On a colder day (i.e.when user 5 is perspiring less, having drier skin in general), someelectrodes may be in a higher-perspiration area (and thus providequality measurements) and some may not requiring use of such a humidityinducing mechanism.

System 100 may also implement moveable, retractable or configurableelectrodes. Such electrodes may change their position, amount ofpressure on the skin or sub-element configuration (for electrodes whichconsist of multiple parts).

Such changes could benefit system 100 in a number of ways, such asadapting the electrodes to different body postures and movement patternsso to provide better measurements, moving the electrodes so to make themmore convenient to user 5 in various body postures and moving electrodesaside or retracting them so to prevent possible damage to both user 5and the electrodes (for example when used in an out of session bikingscenario and user 5 falls off).

Another benefit is moving electrodes to support the use of differentmonitoring techniques during different times. For example, whenmonitoring a sleeping user 5, client coordinator 202 may conserve powerby using an EEG (which consumes more power) only intermittently, and mayrely on GSR monitoring for the rest of the time. As another example,during long-term monitoring, client coordinator 202 may disable (andmove aside) malfunctioning or broken electrodes. It will be appreciatedthat in this embodiment, client coordinator 202 may access scriptinformation from script handler 201 and user information from serversystem 100 to determine best mode of action to handle situations such asbroken or non-effective electrode a sleeping user, low battery powermode etc.

Such electrodes may also employ rhythmic changes so to maintain betterelectrode positions during various activities in which the body of user5 performs rhythmic movement (walking, cycling etc.) using informationgathered about the movement pattern of user 5 as saved in local database208.

Electrodes may also be adapted for use by the same wearable element 60by multiple users (e.g. the same headband used by multiple users withdifferent head size).

Such changes can be effected using micro-motors, electro-magneticelements, form change affected by heat or current, hydraulic drive,pneumatic drive or actuator or any other mechanical motion inducingmeans.

Analyzer 206 (possibly engaging server analyzer 134) may determine whichmovement to make based (for example) on activity type (defined ordetected), general user's body parts position reading, motion detection,guidance provided by the running script, measurement information, sensorinformation, measurement quality analysis, user's historicalinformation, sensor information from sensors installed on the electrodesthemselves, environmental conditions or other parameters.

System 100 may also employ multiple electrodes and sensor activator 2031may select which one to use (with or without moving or retracting theother electrodes) based on conditions described herein above.

Analyzer 206 (possibly engaging server analyzer 134) may also useinformation gathered from sensors installed on the electrodes (asdescribed herein above), as well as the other data sources noted above,as a factor in determining the level of precision to attribute to eachelectrode.

As discussed herein above, as part of the interaction between user 5 andsystem 100, system 100 may apply direct physical effects to the body ofuser 5, such as vibration, pressure (e.g. buzzing) and temperaturechange (hot or cold) which may be generated by thermoelectric cooling(using two metals to affect heat transfer), if there is no refrigerationunit available. Hot temperature is easier to generate.

Other direct physical effects may include low-voltage electrical currentand odor generation.

It will be appreciated that direct physical effects are typicallyapplied by wearable elements 60 (e.g. a wearable element appliesvibration or temperature change to the user). System 100 may alsointerface with an environment control system (e.g. air conditioningsystem, smart home) to apply physical effects which do not requiredirect skin contact, such as changing the room's general temperature orhumidity. In this scenario sensor activator 2031 may instruct thecontrol system accordingly.

Direct physical effects may be combined with other instructions orstimuli, for example, vibration may be associated with specific soundeffect or music segment.

DPE activator 2032 may apply multiple direct physical effectssimultaneously (of the same or different types), and to the same ormultiple body elements. For example, DPE activator 2032 may apply hotsensation to one body area and cold sensation to another. Furthermore,DPE activator 2032 may instruct to the pertinent element to apply avibration direct physical effect to multiple body regions by usingmultiple vibration engines (inside different wearable elements 60).These multiple direct physical effects may have different strength andparameters (e.g. vibration frequency).

The strength (and effect) of a multiple direct physical effects maydepend on the way in which it is applied to the body of user 5. Forexample, an identical vibration might affect user 5 differently ifapplied to a general skin area (e.g. the torso), to the hand (via asmart watch) or to the head.

It will be appreciated that DPE activator 2032 may apply direct physicaleffects during both in session and out of session periods.

Typical direct physical effects uses may be used as a stimulus, to serveas additional sensory stimulus that may be used by scripts (as describedin more detail herein below).

System 100 may use a direct physical effect (such as vibration) as a cuefor a posthypnotic suggestion. It will be appreciated that that somenon-direct physical effect stimuli (e.g. a short audio segment such asstrong beep) may also function as a cue for such posthypnoticsuggestion. Such a cue may be induced in session, and may be associatedwith a given posthypnotic suggestion. When the cue is activated out ofsession, the posthypnotic suggestion is affected. DPE activator 2032 mayalso activate the cue to reinforce its association with suchposthypnotic suggestion.

Some direct physical effect may affect feelings or mental associationsin user 5 and thus may be used as a reward system.

For example, cooling the skin (or heating, based on the weather and skintemperature) is generally a good feeling for most people. An effect maybe generic (i.e. applicable to all users) or may be adapted to a givenuser in some way (e.g. by testing the user response to specific directphysical effect options and settings).

Such a direct physical effect may be used implicitly, providing afeeling which is somewhat below the conscious feeling threshold so theuser is not aware that such a reward system is used.

Direct physical effects may be used as a notification system. System 100may include behavior recognition capability (as discussed in more detailherein below), such as in a smoking cessation scenario. System 100 maydetect various events, such as user 5 taking a cigarette out of its box,lighting the cigarette and putting it in his mouth. Furthermore, system100 may be configured to detect and recognize events which are notdirectly or fully observable by user 5 (such as high blood pressure oruncontrolled shaking). Such recognition may be performed by system 100in session as well as out of session.

For example, system 100 may perform a noticeable direct physical effect(e.g. a vibration, beep or even a small electrical pulse) upon detectingany of these events. This direct physical effect may provide anotification or warning to user 5, making him aware that he isperforming (or about to perform) an action which conflicts with hisstated goal (smoking cessation in our case). This may be helpful even ifthe direct physical effect is not associated with a specificposthypnotic suggest.

Direct physical effect may also be used as a positive/negative feedbackmechanism, for example the direct physical effect can be a pleasantsensation (e.g. cooling the skin) or an unpleasant one (e.g. smallelectrical jolt) creating a positive or negative feedback loop.

Thus, user 5 who (for example) wants to cease smoking may further hisgoal through positive feedback (receiving a cooling sensation if hedoesn't smoke during his lunch break), negative feedback (an electricalpulse whenever he lights a cigarette) or both.

It will be appreciated that this strategy may be combined with aposthypnotic suggestion for which the direct physical effect serves as acue.

Some direct physical effects may also support or enhance the hypnosisinduction stage. For example, applying cold and hot sensation to thewrist or forehead of user 5 may make the hypnosis induction stagestronger. Such an effect may also occur with the use of specific lowlevels of electrical current.

As another example, sending small electrical pulses to specific musclesmay affect them (e.g. make them move), making the script feel “stronger”or more convincing.

A direct physical effect may be coupled with specific sensors whichmeasure the effect of the direct physical effect on the user. Forexample, when using small electrical pulse, system 100 may test thefollow up muscle electrical activity (EMG) in the affected area.

System 100 may also interact with the body of user 5 through one or moreimplants that are inserted into the body of user 5 though a medicalprocedure. The implant would typically communicate with system 100 viawireless communication, but may also be physically connected.

Such an implant may be unique to system 100 (i.e. created to uniquelyinterface with system 100) or an existing implant (performing anunrelated function) which still provides a relevant capability. Such animplant could be temporary (e.g. installed for a specific treatmentinvolving the system for a given duration), long term or permanent.

Such an implant could be passive in nature (i.e. provide only sensingcapabilities, such an implanted continuous glucose monitoring sensor fordiabetes patients) or active (e.g. implanted insulin pump or otherin-body delivery device for any medicine or other substance, or anexternally-programmable artificial cardiac pacemaker).

The implant may be completely contained in the body, or have externallyvisible/accessible parts (e.g. used for communication or to replenishthe supplies of the delivered medicine or other substance). The implantmay also be most external to the body, such as a “smart tattoo” which isembedded in the skin of user 5.

An implant may be a single function device or provide multiplecapabilities (e.g. a monitoring implant capable of monitoring multiplebody parameters).

In particular, an implant may interface with the nervous system of user5, e.g. so to provide reading of information, new input into the nervoussystem or to block specific nerve communication.

As discussed herein above, the retrieval and initial processing ofinformation from user 5 via wearable elements 60 and non-wearableelements 65 may be performed by client hub 20 before it is passed tosystem server 10 for further analysis. Furthermore, client hub 20 mayalso provide instructions to administer direct physical effectsaccording to user 5 behavior as per the pertinent script in use. In analternative embodiment to the present invention, in which wearableelements 60 and non-wearable elements 65 have a built in client hub 20,information retrieval and processing may be performed on system server10. Thus a typical “in session” may occur on wearable elements60/non-wearable elements 65 which may communicate directly with systemserver 10 bypassing client hub 20.

Reference is now made back to FIG. 5A which illustrates the elements ofclient hub 20. It will be appreciated that each element may functionaccording to the instructions from the pertinent script in use based onthe session in use and the wearable elements 60 and non-wearableelements 65 available.

Information receiver 204 may receive feedback accordingly from thevarious sensors used by wearable elements 60 and non-wearable elements65 available. Coordinator 202 may distribute the information accordinglyi.e. to information analyzer 206 for general analysis and to systemserver 10 for further analysis—future integration (with data fromadditional users), backup and persistence support.

It will be appreciated that media segments may be used for instructionsand stimuli delivery as part of a session but may also be useful forother purposes such as event notifications, training segments, on-linemedia based help, UI elements etc. Media handler 2061 may handle allforms of use of media segments as required and as dictated by thepertinent script in use such as delivery of media, selection andadaptation of media segments and pre-analysis of loaded media. Mediahandler 2061 may further comprise a media deliverer 611, a mediaselector/adapter 612, a voice analyzer 614 and an NLP analyzer 615 as isillustrated in FIG. 8 to which reference is now made.

It will be appreciated that media segments may be pre-analyzed beforeuse when uploaded to system 100 by media pre analyzer 176. Mediapre-analyzer 176 may analyze the audio/video media content upon itsuploading into system 100 (via designer store 150 or user script store160), and its storing in database 140, to extract various features andparameters from it, such as its text content and concepts to be used inthe media segment. Media pre-analyzer 176 may create a feature vectorfor each loaded content segment and may match the content segment withfeatures vector created for user 5 (e.g. matching audio segmentscontaining Jazz music with users which prefer Jazz music) e.g. as partof downloaded script personalization as described below. Such featurevector matching may also be performed later by analyzers 134 or 206

For example, media pre-analyzer 176 may detect different correlations,and use the detected information in script personalization as describedin more detail herein below. For example, media pre-analyzer 176 maydetect the use of high-pitched sounds in a given audio segment, whichare known to decrease EEG's alpha rhythm in this specific user. Mediapre-analyzer 176 may also detect that the elements of given contentrefer to swimming and correlate it with the specific user's fear ofwater.

Media pre-analyzer 176 may also detect that a given audio segmentincludes melancholic music which has specific effects on the mood ofuser 5 or may detect that a given user is more attentive to a quickdelivery of speech than to a slow one.

Thus, media pre-analyzer 176 may estimate the effects of a specificmedia segment on a specific user, even if user 5 has never encounteredthis media segment before. It will be appreciated that mediapre-analyzer 176 may take into account (for example) extracted textcontent. This may come from keywords or descriptions pre-associated withthe media segment or from the text of a text segment (e.g. to be usedfor text-to-speech generation) which is associated with the mediasegment in the script. It may also come from a text file providingalternative information for the media segment (e.g. a sub-titles .SRTfile for a video segment), from text extracted using a speechrecognition engine or from text extracted from images or video framesusing OCR.

Media pre-analyzer 176 may also take into account the use of a naturallanguage processing engine on extracted text content so to furtherextract embedded concepts from the text, graphics or video frame contentanalysis (e.g. to find the types of entities and activities portrayed inthis visual media segment). Media pre-analyzer 176 may also analyzeaudio segments (for example) using spectrum analysis for tones, rhythm,quality and gain and for indicators of the segment's emotional content.

It will be appreciated that media deliverer 611 may instruct mediapresenter 2033 to present the selected media to user 5 in the regularmanner, as well as using special delivery techniques (such as binauralaudio delivery and synchronized delivery).

It will be appreciated that media deliverer 611 may instruct mediapresenter 2033 to deliver output which may include visual content usingstill images and video segments, which may be displayed using anembedded screen (built into one of the wearable elements 60 ornon-wearable elements 65), an external device screen, a projectionsystem etc. The output may also include virtual reality (VR) andaugmented reality (AR), which may be displayed (for example) usingspecialized VR/AR glasses technology or using regular screens (similarto regular video delivery).

Media deliverer 611 may also use hologram based delivery which mayinclude specific avatars, and may also encompass user 5 (i.e. functionnot just like a regular UI in front of user 5, but also as a “userenvironment”). Media deliverer 611 may adapt such delivery to the pastresponses of user 5 and calibration information (as described in moredetail herein below). This may help system 100 (for example) indeepening a particular hypnotic session, allowing higher relaxation etc.

Media deliverer 611 may also instruct media presenter 2033 to deliveraudio content via using earphones, speakers or bone-conductiontechnology. Media deliverer 611 may also use bone conduction technologywith external sound generation devices, including devices embedded in orattached to external elements, such as furniture elements. The audiocontent in such case may not be audible in the regular sense, but isconducted over vibration and bone conduction.

Such audio content may include pre-recorded audio segments and generatedaudio, which may include text to speech (including multiple narratorsand choice of narrator by the user); rule-based synthesized music, audioadapted to external rhythm (as discussed in more detail herein below)and human operator's audio which could be provided (for example) as apremium option.

It will be appreciated, that given the appropriate output devices, mediadeliverer 611 may also deliver alternate content which addresses thesenses, such as touch (e.g. vibration, pressure etc.), temperature, odoror taste.

Media selector/adapter 612 may adapt or select the media segments to thecurrent element/device providing playback capabilities. For example, ascript may include playing multiple instances of a given audio segmenthaving different qualities and number of channels (e.g. mono vs.stereo).

Alternatively, media selector/adapter 612 may parameterize mediasegments such as an audio segment, defined using a client musicsynthesis format, with the actual media segment generation performed atthe client side. This may allow media selector/adapter 612 to select oradapt the media segment for different requirements. This may be required(for example) for selecting or adapting the media segment depending onthe element configuration of user 5 (e.g. user 5 is using high-qualityearphones in home session setting vs. using a simple single-ear earphonefor outdoor sport setting) or may be required for selecting or adaptingthe media segment to different playback time. Such time constraints mayresult (for example) from explicit user-set limitation (e.g. the userhas limited the session to 15 minutes) or from session section timingissues (e.g. the user has taken longer than planned to enter trancestate, and now the remaining time for specific trance-stage content isshorter than planned).

Media selector/adapter 612 may also select or adapt due to conditionsresulting from a different session environment (e.g. a session performedin a noisy environment may require using a louder audio segment or amodified version of the given audio segment).

Thus media selector/adapter 612 may provide alternate media of differenttypes altogether. For example, a script may call for use of a videosegment to be used by a user without a video display of sufficientquality. In this situation, media selector/adapter 612 may replace thevideo segment with an audio one either extracted from the video, or adifferent audio segment altogether.

It will be appreciated that the analysis methods described above may beused to create the features vectors associated with media segments andwith specific users. Matching the two vector types may then help mediadeliverer 611 determine which media files to play, to determine how toplay given media files and how to provide alternative media selectioni.e. replace a given media file in a script with another one. They mayalso help media deliverer 611 perform recommendation and unsupervisedlearning, i.e. use information gather about the response of user 5 tospecific media files to learn (e.g. via machine learning) what files toplay or recommend in the future.

Thus as media handler 2061 accumulates more indicators on the specificmedia segment, and on the way it affects various users, the decisionstaken based on these indicators may become more precise.

It will also be appreciated that media pre-analyzer 176 may also analyzenon-audio/video media, such as specific odor combinations generated byan odor-generation component.

As discussed herein above, media deliverer 611 may employ a variety ofspecialized techniques for audio segment delivery which rely on theability to deliver different audio stream to each of the ears. Suchtechniques may include binaural beats (delivering slightly differentbeats to the two ears), delay between the two ears, different amplitudebetween the two ears, double induction (delivering a different messageto each ear), different sound layer combination and by using differentmixing of audio tracks, channels or sound layers for each ear.

It will be appreciated that some of these techniques may have specificeffects on the user/listener (which may vary from person to person),such as affecting specific brainwave frequencies and associatedactivities, or causing confusion.

The relevant audio content may be standalone audio content or the audiocontent associated with a given video content segment.

It will also be appreciated that some of the techniques above may alsoapply to the delivery of video content which include frequency-specificcontent, and the frequency matches specific brainwave frequencies. Thiscould be done with or without having separate video view for each eye.

Furthermore, media deliverer 611 may employ subliminal messagingembedded in video (and possibly audio) content. Such messages (or otherstimuli) may affect the users without being registered in the user'sconscious perception.

It will be appreciated media deliverer 611 may also synchronize anyaudio/video output (regular, binaural or otherwise) in real-time tophysiological (or other) rates as detected by the physiological orphysical sensors, brainwave reading sensors or environment detectingsensors. Media deliverer 611 may also synchronize general scriptoperation to such synchronization rates, and not just specific mediadelivery (as discussed in more detail herein below).

Sources of synchronization rate may include brain waves (in real-time),heart rate, breathing rate, movement/running/cycling rate (for out ofsession use) and behavioral gestures. For example during gym exercise(e.g. weight lifting), media deliverer 611 may synchronize with theuser's “lifting pattern”. Such a rate could be used not only for mediasynchronization, but also for script synchronization so that on everycompletion of the lift the script designer can encourage the user with“very good”, “one more time” etc.

Sources of synchronization rate may also include galvanic skin response,eye blinking, eye movement/gaze direction (e.g. for REM detection) andenvironmental sound. For example, whenever there is substantialrepetitive background noise (e.g. on a train), media deliverer 611 maysynchronize media delivery or script operation so to match theless-noisy periods. Other sources of synchronization rate are facialexpression and muscle relaxation.

Media deliverer 611 may also use any of the other sensors(physiological, physical or otherwise) to provide such synchronizationrate.

Analyzer 206 may also record sensor values over stretches of specificactivity in order to perform frequency spectrum analysis and detectadditional relevant rates in addition to the predefined ones, e.g. ratesof “complete sets” in gym exercise, different from the rates of singlephysical exercises.

Voice analyzer 614 may analyze the voice of user 5, recorded as part ofvoice UI responses or script responses. In addition to regular voicecontent recognition (i.e. recognizing what the user said), such analysismay provide information on the state of the user such as the user'semotional state, mental/physiological state information (e.g. anxiety,stress, fatigue), focus/concentration level (e.g. how long it takes theuser to respond), sobriety level (e.g. is the user's speech incoherentor slurred) and the confidence level of the user, e.g. strength andresolve in responses, evasiveness, hesitation and similar parameters.

It will be appreciated that voice analyzer 614 may analyze not just theactual speech, but also on delays between utterances, strength of speechand similar metrics. Such voice analysis may also detect somephysiological conditions which may be relevant to some scripts, such ascoughing, breathing problems, changes to the user's voice related tosmoking etc.

Such analysis may be also be based in particular on detecting changes tovoice metrics of user 5 as compared to baseline versions of the voice ofuser 5 recorded during the setup and calibration stages of system 100 asdescribed in more detail herein below. For example, some users willnaturally speak very quickly, whereas for some users this could indicatehigh stress level.

It will be appreciated that voice analyzer 614 may detect the currentstate of user 5 that a pre-recorded voice segment analysis is aimed atextracting features from the specific pre-recorded segment so to provideinformation to segment selection, script personalization and othersystem mechanisms.

Voice analyzer 614 may use advanced voice analysis techniques, such asMel-frequency cepstral coefficient sound digest for a number orpurposes, including analysis of the speech of user 5 (as part of theinteraction), analysis of the commands of user 5 (as part of a voiceUI), analysis of the script voice segments (e.g. as part of the scriptpre-analysis process described above) and analysis of speech in theenvironment of user 5 (which may be used by the system as part of theenvironment information).

It will be appreciated that such synchronized media delivery is part ofthe dynamic mode system capability as described in more detail hereinbelow.

Neuro-Linguistic Programming (NLP) was developed by Richard Bandler andJohn Grindler during the early 1970's as methodology for therapy,communication and the analysis of communication. NLP encompassesmultiple tools and skills, and has traditionally been employed bytrained therapists.

NLP analyzer 615 may make use of NLP-based analysis of the user 5'scommunication with the environment to support the progress of user 5towards his desired goals. This is complementary to behavior analysisand recognition (as described herein below) since behavior recognitionallows system 100 to understand what the user does; NLP-basedcommunication analysis allows system 100 to understand the innerelements of the user 5 world based on his communication with otherpeople.

NLP analyzer 615 may record voice and conversations of user 5 (in theenvironment, with the consent of user 5). This includes continuousmonitoring of (e.g. during in session and possibly out of sessionperiods) any such conversations including dialogs with system 100through the pertinent wearable element 60.

Thus NLP analyzer 615 may distinguish the voice of user 5 from thevoices of other people. NLP analyzer 615 may also learn to recognize thesound of an additional person with whom user 5 interacts with on aregular basis such as close family members).

NLP analyzer 615 may separate the voices (user 5 and others) from theenvironment through blind source separation, known voice recognition orinformation gathered by the system sensors. For example, NLP analyzer615 may integrate information about changes in the strength of a givenvoice and tracking of the head motion of user 5 so to better discerndifferent voices originating in different places relative to the user 5.NLP Analyzer 615 may also make use of multiple recording elements tobetter detect the position (and identity) of different speakers.

NLP analyzer 615 may convert the recorded and separated voice tracks totext possibly retaining information such as voice level and tonality, soto provide context or “color” information to the extracted text content.

NLP analyzer 615 may also analyze the conversations of user 5 throughNatural Language Processing techniques as well as model the collecteddata so that behavioral issues can be uncovered.

It will be appreciated that system 100 may primarily use NLP meta-modelanalysis to uncover any underlying issues. The ability to formalize andmodel behavior of user 5 by NLP, mainly through its meta-model analysistools (e.g. deletion, distortion and generalization), can suggestdifferent treatments for behavioral difficulties and matchingappropriate treatment methods in the form of specific scripts, scriptparameters or the use of human therapists.

It will also be appreciated that NLP analyzer 615 may be used inconjunction with Combined Therapy Mode (CTM) (described herein below),so that communication between multiple users of system 100 is analyzedfrom both points of view, and with the information shared between themultiple cooperating scripts.

It will be appreciated that system 100 may be integrated with an on-bodydevice or devices which stimulates the nervous system in some way, andwith the stimulation being part of stimuli applied by the script. Suchstimulation can be performed by sensor activator 2031 in various partsof the body, and using a range of techniques such as physicalstimulation or pressure-based techniques (e.g. similar to the ancientChinese system of acupuncture) as well as electrical stimulation.

A primary candidate for such stimulation is the vagus nerve, which isaccessible in a number of places in the body. In particular, theauricular branch of the vagus nerve is accessible through a deviceinserted into the ear. There are known methods in the art fornon-invasive stimulation (e.g. external neck-area stimulation asdescribed in U.S. Pat. No. 9,248,286 by Simon) as well as minimallyinvasive stimulation (e.g. 0.1-0.3 mm skin penetration via electrodes inthe ear as described in U.S. Pat. No. 9,089,691 entitled “Stimulator forauricular branch of vagus nerve” granted 28 Jul. 2015.

The exact stimulation pattern (power, duration and form) may becontrolled by the script and adapted to the response of the specificuser. The script may use different stimulation patterns at differenttimes, and adapt the stimulation patterns in real-time during thestimulation session.

As discussed herein above, system 100 may perform continuous monitoringand recording of the movements of user 5, based on the available sensorsand possibly including external video view of user 5 if available. Thismay be done both in session and out of session.

Behavior handler 2063 may handle readings and analysis of behavior basedmonitoring. Behavior handler 2063 may further comprise a behaviordetector 621 and a behavior analyzer 622 as is illustrated in FIG. 9 towhich reference is now made.

It will be appreciated, that depending on the availability and qualityof the sensors, behavior handler 2063 may also monitor fine-grainmovements (such as tics and muscle twitching) so to build a morecomprehensive log of the movements of user 5.

System 100 may also use multiple wearable elements 60 to detect motionsof body parts relative to each other, e.g. using two arm bracelets whichcan measure their relative position and distance to gather furtherinformation about arm movement.

Based on the detected motion information, behavior detector 621 mayrecognize gestures and use them for system control and as part of scriptinteraction.

Behavior detector 621 may also use detected motion to detect indicatorsof the psychological state of user 5 such as nervousness, sleepiness,focus (which may be correlated to physical response time) etc.

Behavior detector 621 may detect the body language of user 5, e.g. basedon body posture, micro-motions etc. as well as analyze major motion,such as the way user 5 walks, runs etc.

It will be appreciated that such information may also help in deducinginformation from user 5 responses. For example, when system 100 asksuser 5 (as part of the in session induction stage as described in moredetail herein below) if he feels calm and well rested, user 5 may simplyanswer “yes” or “no” (through nodding or shaking his head). Behaviordetector 621 may be able to detect, based on body language recognition,how calm user 5 is, and possibly recognize that user 5 is saying he iscalm when his body language shows that he seems nervous and tense.

It will be appreciated that user 5 may wish to modify a specific type orclass of movements, and system 100 may measure such movements to supportthe relevant script.

For example, user 5 may be suffering from some tics or twitching, andmay use a script to help him reduce the amount and frequency of tics,behavior detector 621 may evaluate the progress of user 5 (by measuringthe tics or twitching).

Behavior handler 2063 may evaluate the response by user 5 toinstructions requiring user 5 to perform specific physical actions (e.g.a “lift your right arm” instruction).

It will be appreciated that behavior handler 2063 may measure theability (or inability) of user 5 to perform the instructions based onraw motion data received from info receiver 204, and this may indicatethe trance levels of user 5 and the success of the hypnotic inductionprocess.

Behavior detector 621 may detect specific higher-level behaviors,including in particular these which the user would like to modify. Suchbehavior detection may be assisted by additional (non-movement-related)sensors, such as gas sensors which may detect alcohol consumption. Itmay also be assisted by any video capture of the user himself. Suchvideo capture may be available (out of session) from external sources(e.g. an office computer webcam viewing the user and is connected to thesystem), or from video camera included in any wearable element 60 thoughin the latter case system 100 would have to compensate for any varianceand instability of the collected video.

Behaviors detectable through motion detection and integrated sensorinput may include (for example) smoking (detecting a pattern of liftinghand to mouth), eating (possibly including speed of eating and chewingtime), specific sport activities (e.g. walking, running, cycling), bodyposture (sitting, lying down, standing etc.) and body shaking (stress,nervousness).

Other detectable behaviors are Various Body Focused Repetitive Behaviors(BFRB) such as Onychophgia (nail biting), Excoriation (skin picking),hair picking, teeth grinding, repetitive leg syndrome (RLS) and more.

Behavior detector 621 may detect the activity, and may also detect itsbasic parameters (e.g. distance traveled during a walking activity,chewing time during eating etc.). Such behavior detection may also beused to suggest area of improvement to user 5 as noted above.

It will be appreciated that system 100 may typically use an expertsystem (such as server ML engine 136 and client ML engine 2066 asdiscussed in more detail herein below) to gradually learn the movementpatterns specific to the performance of a given activity by the specificuser, possibly correlating it with the information gathered on theexecution of the same activity by other users.

It will also be appreciated that the behavior detection can becompletely automatic or may be user-assisted. In the latter case, user 5may (for example) inform system 100 whenever he picks up a cigarette(e.g. by using a voice command, a gesture with the “other” hand or bypressing a button on one of the wearable elements 60). System 100 mayassociate this indication with the other body movements, and sogradually learn to recognize the specific user's physical movements whenhe picks up a cigarette. System 100 may also include negativeindication, i.e. allow user 5 to inform system 100 that its recognitionand detection of a given activity is incorrect (e.g. indicate that “thishand lifting is not related to cigarette picking”).

Behavior detector 621 may also be able to detect some of these behaviors(e.g., smoking, eating, alcohol consumption etc.) during an out ofsession period based on their effect on the physiologicalcharacteristics of user 5. For example, smoking will raise heart rate,increase skin temperature and cause an increase in EEG alpha bands, withthe exact effects varying from user to user but also between differenttimes the analyzed behavior is performed.

It will be appreciated that analyzer 134 may analyze and correlate thebehavior and sensor information over time for a specific user in orderto create a personalized behavior physiological signature (PBPS) foreach such analyzed behavior. Analyzer 206 may then use (for example) thegas sensor data along with the PBPS information to corroborate theseevents.

Analyzer 206 may also correlate between the measured neurologicalinformation and the detected behavior as part of the PBPS so to supportconcept reading as described in more detail herein below). Thus, system100 may be able, after gathering sufficient personalized data, to locatespecific neurological (and physiological) patterns which may indicate(for example) that user 5 is thinking about smoking. This also allowsbehavior detector 621 to perform “stealth training” for its behaviordetection capability (for the specific user, and possibly assisting thelearning for other users as well).

System 100 may also support detailed behavior detection, for example,behavior detector 621 may detect a general behavior (e.g. eating) forwhich multiple “sub behaviors” exist (e.g. the user is eating differenttypes of foods). This may be required in the scenario where user 5 maywant to assist himself in changing his diet to more healthy foods andtherefore merely detecting that user 5 is eating may not be sufficientfor the script. System 100 may employ the methods described above (e.g.learning system, motion detection, additional sensor integration, videocapture, user feedback and PBPS) to detect such detailed behaviors.

It will be appreciated that neurological information of user 5 may beread (with varying degrees of precision and quality) through a number ofmechanisms or combinations thereof. These mechanisms may includeskin-level measurements as well as these that measure deeperneurological activities. These mechanisms may includeelectroencephalography (EEG), near Infrared Spectroscopy (NIRS), such asthese based on Digital Light Processing (DLP), Functional MagneticResonance Imaging (fMRI), possibly using a mobilized version, GalvanicSkin Response (GSR)/Electrodermal Activity (EDA), Blood Volume Pulse(BVP) or Photoplethysmogram (PPG) signal and Electromyography(EMG)/facial electromyography (fEMG).

System 100 may read and integrate the input from multiple sensors so toget the best information regarding the state of the autonomic nervoussystem and the peripheral nervous system (ANS/PNS).

It will be appreciated that readings are usually made through an EEG,typically performed through electrodes attached to the scalp of user 5.Such electrodes may be part of a dedicated EEG headset, or could becombined with sensors in another element (such as headband or glasses).Different configurations and types of electrodes (as described hereinabove) may provide different precision and reading quality, possiblyrequiring substantial follow-up signal processing and improvement. GSRand HRV may also reflect the state of PNS/ANS. For example, relaxationcan be determined using both GSR and EEG. Each sensor has its ownshortcomings as (for example) GSR changes might not be provide preciseinformation when the user is under the effect of some anti-depressantmedication. On the other hand, EEG is harder to measure continuously andmay also be harder to process and analyze. Thus, system 100 may producethe best results by combining sensors which complement each other.

Neurological handler 2062 may receive neurological readings and processand analyze states accordingly. Reference is now made to FIG. 10 whichillustrates the elements of neurological handler 2062. Neurologicalhandler 2062 may further comprise a neurological information reader 631,a neurological state information processor 632 and a neurological statedetector 633.

Neurological information reader 631 may receive the results of thereadings as described herein above in their raw data format andneurological state information processor 632 may perform pre-processingon the raw neurological information, extracting features which can beused by server ML engine 136, client ML engine 2066 together withstatistical modeling algorithms used by integrator 137 or decision maker2067. Such processing may include noise cancellation algorithms (such asBlind Source Separation (BSS) and adaptive noise cancellation), customIIR or FIR filters, frequency analysis, regression and curve fitting.The extracted features may include spectrum bands and different bandsratios, as well as artifact information and sleep-stage related markers.Similar processing (e.g. BSS algorithm) may be applied to other sensorinputs as well, so to improve the quality of the information extractedfrom them.

Reference is now made to FIG. 11 which illustrates an example process ofthe above mentioned flow of information for a typical session. Some formof physical/physiological input (such as EEG data) may be received (step700) by a wearable element 60/a non-wearable element 65/other sensorwhich may perform signal processing and forward the data to theappropriate analyzer element in analyzer 206 (neurological handler2062.) via information receiver 204 (step 701). In parallel, this datamay also be stored on local database 208 and sent to server 10 forfurther analysis and storage on database 140. The appropriate elementsof analyzer 206 may analyze the data accordingly (neurologicalinformation reader 631 and neurological state information processor 632)and either run it through baseline calculator (2092) if it is a newsession/user 5 (step 702) or pass it on to PBA 207 for abstraction andevent handler/generator 205 to check for any reminders (as discussed inmore detail herein below). Finally the abstracted data is given toscript handler 201 who may activate script runner 2011 to run thepertinent script accordingly as described in more detail herein below.

Neurological state detector 633 may perform neurological state detectionand processing during both in session and out of session periods. Thegathered neurological state information includes multiple complexmulti-frequency signals which describe the activity in multiple brainareas. As discussed herein above, these signals may include electricalflow information (via EEG), blood flow activity (via NIRS or fMRI) orother types of base signals.

It will be appreciated that there may be multiple sets of measurementswith different accuracies which may reflect different combinations ofthe underlying activity signals (e.g. due to the use of multipleelectrodes attached in different positions, or the use of differentactivity measurement methods as noted above).

Furthermore, the measurement may contain differing amounts ofinterferences or “noise”, which may include (for example) noiseresulting from various body functions of user 5, known as artifacts.Such measurement noise may be EOG-induced (due to eye motion/blinking/ .. . ), ECG-induced (Cardiac), EMG-induced (Muscle), etc.

Other interferences may be noise generated by the sensors themselves,interference from the sensor-carrying or other wearable elements 60,environmental noise (e.g. created by nearby electronic equipment), forNIRS readings, interferences created due to motion of skin color effectsand sample rate drift correction. It will be appreciated that some ofthe noise sources above create interferences at specific frequencyrange, and thus require correction for specific brainwave frequencybands (during the brainwave band separation described herein below).

Neurological state information processor 632 may perform high levelprocessing based on the gathered raw information, and provide therunning scripts with high-level information about the neurological stateof user 5. Such processing may include state and transition analysis aswell as concept reading as discussed in more detail herein below. Asdiscussed herein above, neurological state information processor 632 mayfurther comprise a state and transition analyzer 635 to extracthigh-level state information from the raw neurological state of user 5,a concept reader 637 to determine user concepts i.e. determine conceptsthat user 5 is thinking of and a sleep stage analyzer 636 to analyzeuser sleep patterns.

It will be appreciated that system 100 may perform a pre-processingstage (as described in more detail herein below) employing BSS analysisto reduce the noise and artifacts that may have been introduced into anyEEG results. BSS analysis may lower the noise level, and separatedifferent types of data, so noise and interferences do not interferewith the actual analysis of the raw data.

State and transition analyzer 635 may use Evoked Related Potential (ERP)to detect certain brain waves patterns (for the specific user),according to the running script. This may include, for example,performing an averaging process on the signal in certain pre-scheduled“marked” intervals during the running of the script as determined by thescript designer or automatically by system 100.

It will be appreciated that a script may include (for example) aspecific trigger (e.g., instructions, stimuli or direct physical effect)affecting the user, and may direct system 100 to perform detailedanalysis of the response to this trigger in the period following thetrigger. Such an analysis may take into account the delay between thetrigger and the response.

A script may also make hypnotic relaxation deeper (known as “Hardening”)and use suggestions through generated motor imaginary using motor ERP(Event Related Potential) signals. For example, users may be asked toimagine a certain movement—such as hand up, hand down and system 100 maybe required to interpret the imagined movement. Such endogenously motorimaginary techniques may be used to test hypnotic susceptibility andimprove user's confidence in the system's monitoring capability.

Thus, neurological state information processor 632 may performscript-guided processing of the raw neurological information, whichtakes into account the different phases and requirements of the runningscript.

State and transition analyzer 635 may further subdivide any detectedrhythmic activity into multiple bands of differing frequency ranges asknown in the art (<4 Hz for Delta, 4-7 Hz for Theta, 8-15 Hz for Alphaetc.) in order to measure the signal strength of each band.

These bands are known to correlate to various mental state (e.g. statesof awareness, relaxation or resting)—though there is no known precise“trance state signature”.

State and transition analyzer 635 may employ several algorithms todistinguish different brain wave bands, including FFT (Fast Fouriertransform), STFT (Short-Time Fourier Transform) and wavelets. The STFTand wavelets are especially important when performing time-frequencyanalysis. State and transition analyzer 635 may use a Morlet wavelet awell as specialized wavelets for ERP analysis.

It will be appreciated that the fine-tuning of this analysis may rely onuser-specific frequency analysis based on previous sessions. This mayinclude collected knowledge based on running of multiple scripts fromdifferent script providers, i.e. state and transition analyzer 635 mayanalyze a given user's response to a specific trigger (e.g. a specificvibration direct physical effect with specific strength and duration),and use this information to support other scripts from differentproviders. State and transition analyzer 635 may also use theinformation collected for similar by non-identical triggers to inferinformation for the given trigger.

The analysis may also rely on correlation with additional userparameters, such as current activity type, recent activity history,additional physiological or physical parameters, user profile etc. andcorrelation with information collected on other users (includingselecting other users based on similarity or parameters).

Concept reader 637 may also analyze the raw neurological stateinformation to perform concept reading to determine concepts user 5 isthinking about. Such concepts may include actual abstract concepts,specific words and phrases, non-verbalized thoughts (e.g. images, scentsetc.), feelings/emotions and other thought sequences.

Concept reader 637 may perform based on responses to phrases, i.e.concept reader 637 may initiate a specific repeated and covert trigger(e.g. a spoken phrase, an image or a music section), and analyze thespecific brainwave patterns, including in particular the transient(non-rhythmic) ones created in response to the specific trigger.

It will be appreciated that such recognition typically requires a longset of training and calibration sessions. It will be appreciated thatsystem 100 may integrate this process into regular sessions so to avoidrequiring separate training session.

Thus, concept reader 637 may “feed” user 5 with words and tunes during anormal session and repeat them multiple times (to get high Signal/NoiseRatio of ERP's) without interfering with the user 5 experience (e.g. bycombining them with the relevant segments in the “carrier session”).

Concept reader 637 may use the gathered response data to determine howand to what extent user 5 perceives certain words. For example, conceptreader 637 may determine if an association between a word and anemotional event can be made or not. Moreover, it may also allow system100 to determine (to a certain extent) if user 5 is cooperating with thesession or is in a mind-wandering state of mind, i.e. is the userthinking about subjects raised in the session, and whether he isresponsive to stimuli included in the session.

Furthermore, concept reader 637 may attempt multiple variations of theconcept trigger including variations of the actual trigger content aswell as parameters of its introduction. Based on the detected responsesto the various variations, concept reader 637 may create a feedback loopso to improve pattern analysis and find optimal trigger delivery methodfor further concept reading analysis. Concept reader 637 may explicitlyanalyze such a feedback loop using (for example) a genetic algorithm.

For example, concept reader 637 may find that (for the specific user),delivering a concept word trigger to the right ear only, using a givenplayback voice actor, and using a given pitch and voice strengthproduces the best feedback. In this scenario it may instruct mediadeliverer 611 accordingly, and media deliverer 611 may adapt some of themedia and stimuli in future scripts to adapt them to this specificdelivery methodology.

Concept reader 637 may also employ analysis results found when analyzingthe same or similar concepts with other users. This may include inparticular the results of media pre-analyzer 176 when pre-analyzingscript media segments on script loading and user 5 responses to thesemedia segments (as described herein above).

Sleep stage analyzer 636 may analyze the raw neurological information todetermine sleep stages and sub-stages. This way, analyzer 206 maycharacterize states of the consciousness of user 5 and use thehigh-level resulting analysis to synchronize script activities. Sleepstage analyzer 636 may also rely on additional sensor information asdescribed in more detail herein below.

For example, sleep stage analyzer 636 may inspect the frequency spectrumand detect:

NREM stage 1, characterized by high level of alpha waves.

NREM stages 2, characterized by higher level of theta waves, sleepspindles and k-complexes.

NREM stage 3 (SWS), characterized by higher levels of delta waves. NREM3 and SWS stages may be regarded as separate stages under some methodsof analysis.

In an alternative embodiment, sleep stage analyzer 636 may detect theREM stage may through EOG as well as changes in the level of beta,alpha, heart rate and GSR readings.

Such detection may be based on the user's (stored) historical readings,the readings made though the current and session and informationgathered from other users.

For example, during a hypnosis session, user 5 may easily go through afull cycle of sleep stages (i.e. NREM 1, NREM 2, NREM 3/SWS, REM).Through these stages, sleep stage analyzer 636 may determine the exactconsciousness state of user 5 and instruct the script accordingly.

It will be appreciated that in addition to the system-user interfacesnoted above, system 100 may also include interfaces intended to detectenvironment information not directly related to user 5 such asenvironment detector 30A as illustrated in FIG. 3 back to whichreference is now made.

These may include, for example, the detection of the environmental noiselevel, the external light level (e.g. bright daylight, dim room etc.)and the external lighting type, artificial or natural lightings,daylight vs. night time light (e.g. as this may be related to differenttherapeutic techniques).

There may also be sensors to detect UV exposures levels and the externalsetting, e.g. in which room is the user located, is there an opentelevision set or other source of distraction in the same room, etc.

Sensors may also detect geographic location, the temperature level of aroom and the time of day (as this generally affects the level ofawareness of the user and their ability to concentrate.)

Environmental calculator 2064 may detect environmental conditions andcalculate an Environmental Condition Estimation (ECE). The ECEparameters may be taken into account while building up script as well asduring playback time. For example, a script designer might decide toonly play his script in a room with little to no noise, certain lightingconditions or low room temperature.

System 100 may also include advanced environment detection.Environmental calculator 2064 may also try to recognize the type oflocation the user is in (during an out of session period), and possiblyinitiate scripts or scripts sections related to this environment. Thiscould include recognizing a gym, a restaurant, a park etc.

It will be appreciated that recognition of the location could beassisted through location services (based on GPS, Wi-Fi information orother sources). Environmental calculator 2064 may also use publicallyavailable business addresses information and other sources ofgeographical information.

Environmental calculator 2064 may also use information gathered frommedia played in the environment (during an out of session period) andthe response of user 5 to them to further enrich the calibrationdatabase of the user as described in more detail herein below.

For example, Environmental calculator 2064 may recognize that a givenmedia segment (audio, video, etc.) is playing in thebackground/environment (e.g. through a sub-system which recognizesplayed media), and may also recognize the emotional or physiologicalresponses of user 5 to the media segment. User 5 may (for example),become elated to hear some music, become stressed when viewing a horrormovie etc.

It will be appreciated, that in an ideal situation, user 5 may performsessions in a silent environment with no disturbance or backgroundnoise. As noted above, environmental calculator 2064 may perform ECEdetection and the script may in fact require the environmental noise notto exceed specific maximal noise level.

However, in actual use, user 5 may perform a session in noisyenvironment. Such environmental noises may include traffic (e.g.aircraft, train or car noise), rain, wind, construction work, childrenplay, background media (radio, TV or played music) noise, emergencyvehicle sirens, yelling, background conversations etc.

Environmental calculator 2064 may detect these sounds, analyze them anduse a number of ways to mitigate their effect on the on-going session,or actually use the noise to support the session. Such mitigation may bedone in a number of ways (which may be combined) including canceling orreducing the noise via adaptive noise cancelation and using the noise tosupport processes in the running script, e.g. to support deepening ofthe current session.

It will be appreciated that the detection of noise is done throughcontinuous monitoring and detection by microphones. These could be anintegral part of some of the wearable elements 60 (e.g. microphonesconnected to the headphones) or separate, possibly non-wearable elements65 (e.g. the microphone included in user 5's smartphone). To supportadaptive noise cancelation (as described in more detail herein below, itis preferable to include two microphones located as close as possible tothe ears of user 5, or at least one such microphone.

Some of the noises may be highly structured and repetitive (such as theconstant background noise heard while riding a train) while some of thenoise may be highly unstructured (such as the noise created by a nearbyconstruction project).

To cancel or reduce the noise, noise adjuster 2065 may use the techniqueknown as active noise cancelation (ANC) or active noise reduction (ANR).Noise adjuster 2065 may use the microphones (described above) to capturethe environmental noise, and dynamically produces a sound signal havinginverted values or shifted phase (or other specialized patterns).

Noise adjuster 2065 may then mix the sound signal with the session soundproduced by system 100 (e.g. script media/speech output) so to cancel orreduce the effect of the environmental noise.

In a complementary solution, noise adjuster 2065 may attempt to adapt(rather than cancel or reduce) the environmental noise. Noise adjuster2065 may analyze the noise, and recognize that it is similar to anothersound which is far less disrupting. Noise adjuster 2065 may then usetechniques similar to these used in ANC/ANR (e.g. generating ashifted-phase sound track of the difference between the two sounds) soto modify the existing (disrupting) sound to a less disrupting one.

In an alternative embodiment, noise adjuster 2065 may turn thisbackground noise to something relaxing, something that will deepen thestate of user 5 considerably, convincing user 5 that every yell willtake them deeper and deeper into relaxation. System 100 may convinceuser 5 that the environmental sound is in fact relaxing and cannotdistract user 5, and would thus leverage these sounds to deepen thestate dynamically.

Such an approach is best applied to repetitive sounds, and these whichcan be predicted to some extent. For example, user 5 may perform asession in his home, next to a school which plays a specific (loud)music to announce the beginning and the end of each school break.

Noise adjuster 2065 may perform a personalized calculation for each userwhich depends on numerous personalized parameters as detailed below thecurrent relaxation state of user 5.

Furthermore, noise adjuster 2065 may experiment with each user todetermine when and how to apply this technique. Some users may prefer(and respond better) to ANC/ANR, and some users may respond better tosuch leveraging of the environmental noises and such preference maydepend on the relaxation state or stage, the specific environmentalnoise and other parameters.

Noise adjuster 2065 may employ a feature extraction engine, which mayanalyze the surrounding noise and take any of the following factors intoaccount: user specific parameters and information and background noiseinformation, e.g. how much is the current “noise session” repetitive. Itmay also take into account a target set of “effective” sound sequences,e.g. types (and samples) of background noise which are known to beeffective in general, for the current user or for users similar to thecurrent user based on a set of attributes or parameters) as well as thecurrent state of the user (in general, and specific to the currentsession) and background noise history during sessions, previoussessions, and for the specific time of day or day of week as related tothe given user or environment.

Also taken into account may be GPS location and specific environmenttype (e.g. are we in/near a train station if so, we know we can expectincoming trains at given frequencies or times), traffic information(e.g. from external systems 40 which provide current traffic informationsuch as Google's Ware), time information, known background noiseprofiles during day/week/month/year (including taking holidays intoaccount) and human speech and speech analysis, for example, in case ofemergency the system might promptly end the session.

Based on all of the above, noise adjuster 2065 may estimate the expectedprofile of the background noise, how much is the noise likely tocontinue, and how repetitive it would be. Based on this and theparameters above, noise adjuster 2065 may converge on best method(subtract/cancel/modify) or mix of methods to handle the backgroundnoise, implement them, test the response and possible modify the methodused along the way.

Furthermore, noise adjuster 2065 may make a script-specificdetermination (e.g. use a given environment noise for deepening in onepart of the script and awakening in another part of the script).

System 100 may make similar use of other, non-noise environmental orbackground conditions, such as vibrations, rain high humidity, coldetc.). This could be as a part of a session (e.g. “The train's constantvibrations reminds you of the rocking cradle you slept in as a baby,making you want to sleep”).

This could also be used during out of session, noise adjuster 2065 mayintegrate information on such background sounds and other (detected)background conditions, activity recognition and other information (suchas script running history and time of day) to generate out of sessionprompts to user 5. System 100 may use such prompts to connect in theuser's mind between noticeable external conditions/events and specificdesired thoughts, suggestions or moods.

Such out of session prompts may be vocal (e.g. when detecting rainduring physical ac, “You feel the rain in your hair, cooling you downand making you run better”), vibration based or based on other forms ofdelivery available in system 100.

Such prompts may include notifications, reminders or media delivery e.g.instructions or stimuli). They may be generated during a specificactivity (e.g. during a physical training session), or may beindependent of any activity (e.g. a reminder to the user to engage inspecific activity or refrain from one).

Such prompts may be limited to a simple message to user 5 which connectsto background condition (sound vibration, humidity). Such prompts mayalso be associated with a trigger to activate a previous suggestion,e.g. when performing physical activity and the temperature drops,triggering a specific suggestion which helps the user make his physicalactivity ore intense (which also helps the user warm up).

It will be appreciated that a person does not live in a vacuum andfamily members and close friends have a tremendous impact on the nervoussystem, which can affect the physical and emotional state of a user aswell as his health.

An example is when a couple is going through some tough period or acrisis. If both partners are using system 100, it is possible (with theconsent of both users) to integrate the data collected from both usersand to find better scripts and therapy that will serve them both better.As another example, when attempting a health improvement regime, such asa weight-loss diet, smoking cessation or sport activity, it is oftenadvantageous for both partners to engage in a similar regime oractivity. This way, each partner could support his partner's progress,and the couple could engage in some activities jointly.

In an alternative embodiment to the current invention, system 100 may beconstructed to serve multiple users, or use multiple instances of system100 interconnected either locally (e.g. through communication meansadapted to system 100 instances located closely together) or remotely(e.g. through the common server or directly in using remote peer-to-peercommunication).

Moreover, it is possible to treat the couple separately, presenting eachpartner with a complementary script so to mitigate the difficulties inhandling a crisis situation (for example). Alternatively, the couple maytake a joint treatment session, with the script possibly includinginteraction between the two partners. Note that in such situations thescripts (for each partner) may be quite different from each other, butmay still cooperate or complement each other.

Another example for such use is pregnancy period, during which system100 might detect high level of stress in both the woman and the man, andmay be able to match and fine-tune treatments for both of them and notjust for the woman.

Thus system 100 may support multiple connected users in such way, andnot just couples. For example, three friends who decide to start runningtogether may use coordinated scripts between them which would supportall three of them in their joint endeavor.

It will be appreciated during out of session periods; system 100 doesnot allow scripts to run on an on-going basis. Rather, system 100 maydefine a finite set of events, and may allow scripts to be associatedwith the occurrence of events and be activated when the event occurs.Such events may include, for example user behaviors (e.g. the user haspicked up a cigarette or has actually started smoking one), timetriggers (e.g. every day at 12:00) and user-relatedphysical/physiological/mental events detected by the system 100 sensors(e.g. blood pressure rising above a certain level or a certain EEGpattern). This may also include results of higher-level analysis of thesensor input (e.g. detecting that the user is highly stressed based oncombined sensor, video and voice analysis).

Such events may also be environment-related (e.g. whenever user 5 entersa restaurant as detected by video or GPS analysis) or a combination ofany the above (e.g. the user 5 has opened a refrigerator between 22:00and 7:00, or user 5 starts smoking a cigarette while his heart rate isabove a certain value). The qualifying conditions of such a combinationmay be referred to as event conditions.

It will be appreciated that client system 25 may maintain a log of allsuch events stored on local database 208 and may synchronize thisinformation with database 140, even if not associated with a specificscript. This way, when associating a script to an event in the future,analyzer 134 may analyze earlier occurrences of the event (i.e. beforethe association was made) and provide additional analyzed information tothe script. This way, for example, a weight loss script would receiveinformation about the eating habits of user 5 and may be able to selectthe appropriate therapy strategy to use.

It will also be appreciated that event definitions, script/eventassociations and event logs are all system-level and persistent. User 5may change a wearable element 60 at any time (e.g. replacing sportactivity headband with a different work-time headband) and thedefinitions/associations/logs should be persistent across the change. Itwill be appreciated that the information may also be stored on one ormore client system 25 elements (including local database 208 inparticular), external client side systems 30 or the system server 10depending on availability. Client system 25 may synchronize the locallystored information with system server 10 whenever an appropriateconnection is available.

Based on the triggering of events (and any associated event conditions)script runner 2011 may start running the associated script as describedin more detail herein below.

It will be appreciated that there can be multiple scripts associatedwith different events. Such associations are requested by user 5 or thescript (e.g. if user 5 runs a smoking cessation script, the script mayrequest activation during the out of session stage whenever the userpicks up a cigarette or smokes one). Script controller 2013 may controlthe associations to prevent two scripts from running at the same time(e.g. due to the same event), possibly limit an out of session scriptrunning time and allowed actions, and provide proper spacing betweenscripts. System 100 may prompt user 5 to confirm such out of sessionactivation.

When running, the script may instantly alert user 5 (e.g. through avibration engine or other direct physical effect). The vibration (orother direct physical effect) may also be associated with a relevantpost-hypnotic suggestion.

As discussed herein above, system 100 may maintain a global log for eachevent type in which data is kept and accessible by scripts that are usedby user 5. Such logs may typically include additional information aboutthe time, location, circumstances and environmental conditions. Thisinformation could later be used to improve in session script behaviorand better adapt it to the specific obstacles facing user 5.

It will also be appreciated that the elements of system 100 perform theinput (raw data) processing and extraction, and only return theextracted abstract information to the script, which does have access tothe raw data.

Thus, a script would not receive exact EEG readings, user pulseinformation or low-level motion detection readings. Rather the scriptmay receive abstract events (“user is not calm”), possibly withadditional abstract parameters (e.g. “user calmness level at 0-100%”).

Physiological and behavioral abstractor (PBA) 207 may perform thisabstraction based on information collected and analyzed by system asdescribed herein below.

PBA 207 may also handle script outputs. For example, the script mayrequest to “calm the user”. PBA 207 may use information collected bysystem 100 from multiple users on which types of stimuli and signalswork best, and which do not, and specific information on the currentuser. Thus PBA 207 may determine the best way to handle such requests.This could be a highly individualized action by system 100, such as heatdirect physical effect for one user 5 or a specific music segment foranother user 5.

Alternatively, the script may provide a base output stimulus, but allowsystem 100 to replace it with alternative segments in some cases.

In an alternative embodiment to the present invention, PBA 207 may allowsome scripts to use specific stimulus media in specific points, ratherthan letting PBA 207 select all media to be played. This could be, forexample, a specific stimulus or media segment for which there arespecific references in other system output segments.

Thus, PBA 207 may act as an interface layer between the script and theinputs and outputs of the script, translating or analyzing these inputsand outputs as required. As described above, PBA 207 does not typicallyperform a direct translation, but rather a more advanced form ofabstraction/interpretation (on input) or decision.

As discussed herein above, system 100 may guide user 5 through a seriesof phases which may be repeated as desired to achieve the desired goals.These phases may include in session and out-of-session use, andadditional phases supporting these periods.

System 100 may allow user 5 to combine in session and out-of-sessionperiods in any desired manner, e.g. he may perform a number of sessions,and only then use system 100 in the out-of-session mode. Conversely,user 5 may perform a single session, and then use system 100 multipletimes in out-of-session mode. User 5 may also mix multiple in sessionstages, each of which is related to a different script, without-of-session stages (which may in general relate to multiple scriptsas further described below).

Thus the primary activity of system 100 during the out-of-session periodis monitoring user 5 so to provide appropriate data to the in sessionscripts, while possibly activating some of the scripts based on eventassociations as described herein above.

For example, system 100 may monitor the frequency and circumstances inwhich a user reaches for a cigarette and the occasions in which heactually smokes one (including environmental, physical, physiologicaland mental information).

This information could help a smoking cessation script determine whenuser 5 is tempted to smoke, and when he actually manages to fight thistemptation.

As discussed herein above, scripts do not run independently duringout-of-session periods. They may be run based on a particular user 5request (e.g. “I want to fight my smoking habit”). A script mayassociate script segments with given out-of-session events andconditions under the control of system 100 (e.g. “Activate scriptsegment X whenever user 5 actually smokes/whenever the s pulse rate ofuser 5 is above X”).

Script runner 2011 may operate these script segments when the events andconditions occur, ensuring proper spacing and no-interference betweenany running script segments (i.e. running them in a managedenvironment).

It will be appreciated that the entire process may be under high-levelcontrol of user 5 (e.g. determining which scripts may operate during anyout-of-session period). Such user 5 control may be done on a high levelbasis (a general setting control panel) or on detail basis (e.g. via aprompt “The script X would like to use smoking detectioninformation—please confirm”).

It will also be appreciated that the script segment hooked to a givenevent may, for example, may perform an effect which is associated with agiven suggestion. For example, a smoking cessation script segment mayemit a specific audible tone, or perform a vibration direct physicaleffect, when system 100 detects that user 5 is reaching for a cigarette.This tone or vibration may in turn be associated with an anti-smokingsuggestion.

It will be appreciated that in session period may instill and supportthe desired change in user 5 (be it improvement, mental change orbehavior modification). The out-of-session period then serves toreinforce the desired change, provide feedback to user 5 as well assystem 100 and may monitor and measure the progress of user 5 to provideinformation for further sessions. The out-of-session period monitoringmay also detect new behavioral or medical issues which did not exist ordiffer from the previous conditions and an analysis of these changes maytrigger specific script sections as required.

Thus system 100 may handle multiple issue types (behavioral, medical, orother areas of change). User 5 may be aware of some of these issues, andmay be unaware of others. For example, some issues may be obvious (andexternally observable), such as excessive smoking or problems with sportperformance and user 5 may is fully aware of them and would like toimprove them.

Some issues may still be externally observable but user 5 is not always(or ever) aware of them. Examples may include nail biting, restless legsyndrome etc.

Some issues may be internal to user 5, and not easily observable fromthe outside, but user 5 may be fully aware of them and would like tohandle them. These may include, for example, various types of stress ofphobias.

Some issues may not be externally observable, and user 5 may be aware ofthem or not. Example may include high blood pressure or other “internal”conditions, which are not observable, and user 5 may be aware of them(e.g. through past medical examination), or not at all.

It will be appreciated that for the scenarios where user 5 is not awareof the problem, system 100 may still detect the problem through itssensors and monitoring capability (during both in session and out ofsession periods). System 100 may try to report on such problems andsuggest solutions, in the form of different therapy/script techniquesthat fit the profile of user 5.

Thus, system 100 may handle issues detected (and suggested) internallythat user 5 was not aware of before, as well as other issues that user 5would like to “tackle” and hence he is aware of.

Reference is now made to FIG. 12, which illustrates the different phasesof system 100 for each session. The phases are:

Initial system learning and setup phase (step 500).

Pre-execution profiling (step 510).

Pre-session evaluation (step 520).

In session phase (step 530).

Post-session de-briefing (step 540).

Out of session use phase (step 550).

It will be appreciated that all phases may include interaction with user5 through various UI methods (including visual/touch, physical buttonsor other controls, voice UI, gesture and expression based) as discussedherein above. However, system 100 may use different methods fordifferent phases and settings (e.g. full alertness, in session tranceand outdoors out of session use which all may all require differentinteraction methods).

These phases are described in more detail herein below. It will beappreciated that for illustration purposes, the description refers to ascenario in which system 100 is used with a smoking cessation script.The description below focuses on a typical system 100 use scenario,which includes a hypnotherapy session in session phase, integrated withapplicable use during an out of session phase.

It will be appreciated that system 100 may also be used in a number ofalternative scenarios such as a non-hypnotherapy in session use. Thesemay include (for example) sessions performed by a human therapist (suchas psychoanalysis, acupuncture or other treatments), sessions performusing various technologies (such as Transcranial Magnetic Stimulation(TMS), heat-based therapy or visual/audio/smell based therapy) and othermedical or alternative medicine procedures.

System 100 may also be used in cases in which the in session phaseconsists of a hypnotherapeutic session performed in conjunction withanother treatment, e.g. to replace anesthetics during a medicalprocedure, or to reduce the side effects of some medical procedure.

System 100 may be used with an in session only mode, without integratingout of session tracking.

System 100 may also be used in out of session only mode, e.g. to monitorthe effects of a non-system-managed therapeutic session (hypnotic orotherwise) and to detect new behavioral or medical issues (as discussedherein above).

It will be appreciated that initial system learning and setup phase(step 500 in FIG. 12) is typically performed upon initial access tosystem 100. However, user 5 may return to this phase under a number ofcircumstances as discussed in more detail herein below.

It will be appreciated that this part of the phase includesinstallation, setup, updating/upgrades and testing, including inparticular device recognition and connectivity testing.

As discussed herein above, wearable elements 60 and non-wearableelements 65 may be delivered as complete kits (including both hardwareand software) while some may require installation (of hardware add-onsand/or software) on external systems such as the Smartphone of user 5.

Furthermore, system 100 may consist of multiple separate devices whichmay be replaced, and devices may be added or removed as needed. Thusthere is a need for system 100 to test the devices themselves, as wellas the connectivity between devices (including any newly added devices)to ensure proper functioning.

It will be appreciated that connectivity testing is particularlyimportant with non-traditional device connectivity methods, including inparticular body-area networking (i.e. using the body as a signalcarrier). Such connectivity testing may include the connection withexternal devices (non-system elements) which may perform part of thesystem functionality. System 100 may also provide on-the-flyre-configuration and connectivity detection, allowing later dynamicaddition of devices to the system.

Reference is now made back to FIG. 5E which illustrates the elements ofsetup/config handler 209. Setup/config handler 209 may set up system 100for a new user 5 the first time he uses system 100. As discussed hereinabove setup/config handler 209 may further comprise a user profilebuilder 2091, a baseline calculator 2092, a system tester 2093 and auser trainer 2094.

As described above, system 100 may contain a substantial number ofsensors and direct physical effect devices, including devices combiningmultiple such functions. It will be appreciated that some of thesesensors require careful placement or physical configuration. Forexample, the quality of EEG reading may vary greatly depending on theexact placement and fit of the electrode carrying device (e.g. aheadband). This may vary from user to user, e.g. depending on the exactskull shape. Thus, system tester 2093 may require that user 5 test thevarious sensors and direct physical effect devices, so to make sure theyare properly configured and adapted to the specific user

User trainer 2094 may train user 5 in the use of system 100 and itselements, through an interactive learning system, on-line tutorial, avideo tutorial or other means typically via a built in screen or ascreen non-wearable element 65.

It will be appreciated that during the initial learning and setup stage(step 500); user profile builder 2091 may build a psychological andphysiological profile of user 5. User profile builder 2091 may collectand store data during an interactive session with user 5 including theselection of issues to tackle (smoking, dieting, self-improvement,etc.), specific goals, personal preferences etc. As discussed hereinabove, these topics may include issues requested by user 5 as well asthose suggested by system 100 (as discussed in more detail hereinbelow). The results from user profile builder 2091 may be also be usedby script handler 201 and PBA 207 to provide parameters for theexecution of a pertinent script. User profile builder 2091 may alsoassess any user expectations.

Baseline calculator 2092 may also collect baseline values for thevarious physiological sensors (e.g. EEG or heart rates) and physical(e.g. motion) in a normal alert state. Such collection may be performedduring the entire phase, including in particular during the systemlearning sub-phase. These baseline values are later used as referencevalues for the various scripts. Baseline calculator 2092 may modifythese reference values based on later out of session measurements. PBA207 may use this information as described herein above.

User profile builder 2091 may also import any relevant information fromexternal sources and systems 40 (accessible through system server 10) or30, such as a user medical information, genetic information (whenavailable) etc.

As discussed herein above, system 100 may perform continuous monitoringand recording of the input sensors, this information may be stored ondatabases 208 and 140 and may describe the state of user 5 over time. Itwill be appreciated that baseline calculator 2092 may use this data toform a baseline for further measurements. This is performed inparticular as part of the initial system learning and setup phase (whichprovide a canonical baseline set), and later in the pre-executionprofiling phase (during which the system runs a system calibrationsuper-script) but continues throughout the use of system 100.

Analyzer 206 may detect that some parameters of the state of user 5(neurological, physiological, physical or otherwise) are out of theordinary, and may check values not just against the generic expectedvalues, but also against the specific values for the same user in asimilar situation in the past. Analyzer 206 may also compare stateparameters against these of other users in the same or similarsituations, and may also compare state parameters against each other aswell as the profile parameters of user 5 (so to find correlationsspecific to the given user or to multiple users, including correlationswhich depend on specific user profile parameters).

The profile parameters used for user correlation (and the resultingbaseline calibration) may include various personal parameters, such asthe gender, age, etc. of user 5. They may also include physiological (orother) parameters of user 5 not typically measured by system 100, butimported from user 5 reporting or other medical systems. These couldinclude (for example) information about the user 5 medical history andprofile, genetic profile, hormone level, psychological profile, externalevaluations etc. Some of this information may be fixed whereas some mayvary over time (e.g. hormonal measurement parameters).

Analyzer 206 (possibly consulting with analyzer 134) may compare currentstate parameters values against the baseline information to provideinformation and guidance to running scripts. These two sets of valuesare also used by PBA 207 as described in more detail herein above, todetermine the processed (abstract) user 5 state values provided as inputto the script.

For example, when beginning a session, and before starting the inductionprocess, Baseline calculator 2092 may note the neurological state of theuser (e.g. EEG readings), physiological state (e.g. muscle twitching,HRV and GSR) and physical state (e.g. use the motion sensor to detectRLS etc.). Based on this combined information, baseline calculator 2092may determine whether user 5 is particularly nervous compared to hisordinary state. Baseline calculator 2092 may then provide thisinformation script handler 201 which may (for example) either preventuser 5 from running the script, determine to proceed as usual or modifythe script behavior (e.g. add a relaxation sub-script in the beginningof the session). Script handler 201 may also switch to a differentscript or run the script, but use modified baseline values for somestate parameters during running (e.g. use different brainwave valuethresholds to determine script transitions).

As another example, analyzer 134 may also deduce that a certain scriptor script variation is more effective on female users in the age range20-30 with South American ancestry, but requires different brainwavereading threshold (for given transition points) than the generalpopulation. In this scenario, Analyzer 134 may notify script handler 201accordingly.

As baseline calculator 2092 accumulates additional state and baselineinformation, it may learn about user 5 and may modify the baselinevalues for further activities (e.g. “this user moves a lot, so correctthe threshold for detection of nervousness”).

It will be appreciated that based on the data gathering processdescribed above, Baseline calculator 2092 may perform stealthcalibration, executing the calibration process while minimizing (oromitting entirely) any requests for explicit actions by user 5.

For example, the system 100 vendor may create a training model for EEGartifacts removal or for gesture recognition during various parts of theintroductory phase of system 100 to be presented to user 5 by usertrainer 2094. This way, system 100 may avoid annoying user by requiringhim to execute a tiresome training session.

Baseline calculator 2092 together with PBA 207 may also use calibrationrequirements when evaluating (for example) which media segments to usefor various purposes. Thus, baseline calculator 2092 together with PBA207 may handle a request by the script to “calm the user” by playingdifferent segments of music using other stimulus or direct physicaleffect altogether) at different times, and so expand the baselineinformation regarding the responses of user 5.

Thus baseline calculator 2092 together with PBA 207 may experiment,essentially performing an automatically-generated multivariate test, soto find the best way to calm user 5.

It will be appreciated that baseline calculator 2092 together with PBA207 may run system server 10 or on client hub 20. Baseline calculator2092 may collect information and updates both databases 208 and 140 withbaseline information about each user. Database 140 may also includemultiple baseline value together with information about the conditionsunder which they were gathered, e.g. a baseline heart rate is differentbetween a sedentary session and an out of session physical activityperiod or during day time vs. night time.

During media playback, the biological/physical sensor values arecollected and quantified by analyzer 206 A generic biological baselineis derived as well as a specific baseline that correlates with the typeof media that was played.

It will be appreciated that there may be a general baseline thatcharacterizes user 5 while active, resting, stressing etc. and aspecific media “baseline” per script/media segment in order to compareand weight each script or partial section of a script. Baselinecalculator 2092 may also take environmental values into account so tocreate multiple baseline versions (e.g. different GSR values dependingon the temperature and resulting levels of perspiration).

Integrator 137 may create an initial baseline based on that of otherusers with similar attributes/profile as described in more detail hereinbelow. Baseline calculator 2092 may also gather baseline data fromexternal sources 40 (such as medical database or specific baseline datacollection projects). Integrator 137 may further correlate the baselineof user 5 to that of other users.

It will be appreciated that all data is managed by information analyzer206 and is used when running multiple scripts, and therefore it is notprivate to a specific script. PBA 207 may use the stored calibrationdata and profile information (from local database 208) to process theraw inputs and to provide the script with high-level abstract analyzedinformation (without providing the actual raw data) as described hereinabove.

It will be appreciated that once this phase is completed, system 100 hasthe basic information required for both in session and out of sessionuse.

It will also be appreciated that user 5 may have to return to this phasefor example, whenever the system 100 configuration changes or additionalexternal user data is available. In particular, the sensors may have tobe re-tested whenever starting a session (as described herein above),but only after primary setup and configuration have been performed inthis phase.

It will also be appreciated that the interaction in this phase is mainlycontrolled by setup/config handler 209 and not by any specific script).However, user 5 may select scripts in this phase to be used in laterstages.

It will also be appreciated that system 100 may be configured for jointuse of some of the wearable elements 60 and non-wearable elements 65 bymultiple users. In this scenario, system 100 may support multiple useridentities, with each user having its own user profile, scripts andinformation, including different calibration parameters and a baselinefor information for the same sensor when used by different users.

In this scenario, the physical configuration of system 100 should besuch that elements which physically touch the users (electrodes, on-skinwearable elements and other) should all be replaceable (single ormulti-use), or built to facilitate their cleaning or sterilization.

During the pre-execution profiling phase (step 510), setup/confighandler 209 may run a general-purpose calibration script that determinesdifferent parameters needed to run and select scripts. System 100 maylater use the collected information for all other scripts.

It will be appreciated setup/config handler 209 may instruct scripthandler 201 to play the system calibration script to a new user 5 inorder for user profile builder 2091 to build a new profile. Thecalibration script may collect physiological characteristics (such asuser's resting pulse, resting breath rate etc.), may play differentsub-scripts that include different themes, hypnosis and therapytechniques to user 5 and may and collect information that can be used todetermine the impact on the of each sub-script on user 5.

This system-run calibration script may also play possible media segmentsand possible triggers (which may be generated by media handler 2061 andPBA 207). The calibration script may also try to apply multipletherapeutic techniques, assessing their compatibility and effectivenesson user 5.

It will be appreciated that the collected data gathered by baselinecalculator 2092 may be “shared” with other scripts. Though scriptscannot really access this collected data, script runner 2011 may use thecollected data indirectly (via PBA 207) to play different scriptsoptimally. It will be appreciated that this collected data is the oneused by PBA 207 to provide abstract high-level events and information tothe script (e.g. “the user is not calm” as the user's current heartpulse rate is higher than the one measured when the user is resting).

Setup/config handler 209 may re-run the calibration script (fully orpartially) so to confirm various physiological measures which may changeover time.

The pre-session evaluation phase (step 520) is performed just prior tothe running of the actual session.

Setup/config handler 209 may trigger environment sensor 30A to detectrelevant environmental conditions to the pertinent therapy. As discussedherein above, environmental conditions may affect the functioning of thescript, and may prevent some scripts from running entirely (e.g. anaudio-oriented script may be unusable in a noisy environment).

Environmental conditions may also affect parameters such the runningtime allocated to the script, the way temperature sensation directphysical effect is applied (heating in cold room, cooling in hot room),the sound stimulus volume level etc.

As discussed herein above, baseline calculator 2092 may perform baselinevalue recording for use in the upcoming session, receiving theup-to-date values for the various users' physical and physiologicalmeasurements. This allows system 100 to further deduce information aboutthe user's physical, physiological and (possibly) psychological state,building an extended and up-to-date profile of the user.

System Tester 2093 may present options of scripts to user 5 to selectaccording to the problem user 5 would like to deal with (e.g. smoking,insomnia, etc.) and providing the user 5 with the means and suitableinterface to fine-tune session goals and out of session monitoring. Thisscript selection process may refer to additional parameters provided byuser 5 (e.g. problem severity).

It will be appreciated that this phase may involve searching for ascript and purchasing it directly from the system 100 vendor, from userscript store 160 or other source as discussed in more detail hereinbelow. It will also be appreciated that user 5 may be using system 100to run multiple scripts, and would need to select which script he wouldlike to run now. It will be further appreciated that the running of thechosen script may depend on environmental conditions and the state ofuser 5, which may prevent some scripts from running, and may make somescripts less desirable.

As discussed herein above, system tester 2093 may perform an initialcalibration of the sensors and elements to the user 5 during thelearning and set-up phase (step 500). However, baseline calculator 2092may also recalibrate and test the various sensors and elements (as wellas the connectivity between the elements) just prior to the session.This way, system 100 may ensure that the calibration, setup andconnectivity are proper for the immediately following session, and forthe current element combination.

Setup/config handler 209 may also perform an additional dialog with user5 at this stage. This may include gathering any additional informationrequired by user profile builder 2091 to expand the user's profile orotherwise. This dialog may also include specifying any scriptlimitations for the upcoming session that would be enforced on therunning script. For example, user 5 may set a time limit (e.g. “allow 30minutes for the upcoming session”) which would be enforced by system 100on the running script, so even in case of script error or problem. Otherlimits may be related to medical or other physiological condition of theuser (“don't let the script run if my blood pressure rises above X”etc.).

It will be appreciated that setup/config handler 209 may provide theselimits to script handler 201 to incorporate into the script, which mayplan its work accordingly. Furthermore, script controller 2013 may abortthe script (using the nearest interruption point if available asdiscussed in more detail herein below).

The dialog may also include any parameters or other information neededby the script, e.g. expected session length, information about theexpectations of user 5 from the session and any other script-specificinformation.

It will be appreciated that all information gathered may be recorded indatabases 208 and 140, and may be used by the different elements ofsystem 100 and the scripts to affect the upcoming session as well as outof session use and future sessions.

The in session phase (step 530) may include the actual session, and ismanaged by a single running script, under oversight of script handler201 (which may enforce some limitations as required by user 5). Even ifuser 5 has multiple goals and is interested in running a number ofscripts, a single session still operates under a single script.

For the smoking cessation example, the in session would include ahypnotic session which induces general suggestions related to smokingcessation, as well as a specific suggestion making cigarettes handlingundesirable or unpleasant. The specific suggestion may further beassociated with a vibration sensation (a direct physical effect)affected by sensor activator 2031.

It will be appreciated that the various possible sub-stages of thesession (introduction, relaxation, attention focusing etc.) aredescribed herein above. However, the composition and sequence of thesestages is under control of the running script and different scripts mayemploy different stages and stage structures. As discussed herein above,the stages are dynamic, and some stages may be skipped, prolonged orshortened.

Furthermore, the in session stages may include stages in which user 5 isin some form or stage of sleep with the script being synchronized withthe various sleep stages. Though synchronization of script stages tosleep stages, system 100 may start a session without induction, using(for example) background music to let the user fall asleep and onlystart the induction when the user has reached a specific sleep phase.System 100 may also perform stages which require a certain sleep stage(so to enter deeper levels of hypnosis) and may also end a session byhaving user 5 leave the trance state but remain asleep.

Post session debriefing (step 540) maybe be performed by post sessionde-briefer 210 which may gather user feedback on system 100 in generalas well feedback on the specific script and session. Post sessionde-briefer 210 may forward this collected post-session feedback toscript handler 201 to affect follow-up sessions accordingly and analyzer134/server ML engine 136 to be gathered into a per-script profilecollected by system 100 (e.g. are users satisfied with the script? Doesit help them?).

It will be appreciated that post session de-briefer 210 may be initiatedby user 5, the script itself or script handler 201. It may also beinitiated due to information received from server 10 or other users.

The de-briefing may include in particular any problem or distressconditions (as described herein below) encountered during the sessionpossibly inquiring user 5 about them and determining if they shouldaffect the session planning or future script use.

In an alternative embodiment, the de briefing phase may be excluded andsystem 100 may gather information as part of a relaxation/wakeup orlater stage as required without asking user 5 any explicit debriefingquestions.

The next phase is the out of session phase (step 550). It will beappreciated that system 100 use during the out of session period may becharacterized by longer term use compared to in session use, possiblythroughout an entire day, or maybe during certain activities or periodsof the day. Furthermore, such use may occur in the typical environmentof user 5 (e.g. driving, working or sport activity), typically when user5 is engaged in various tasks, and possibly moving. Furthermore, system100 may be used during sleep (e.g. in conjunction with the treatment ofsome sleep disorders).

Thus, the configuration of system 100 including the selection ofelements (especially wearable elements 60) and system use pattern shouldbe as convenient, power efficient, non-intrusive and inconspicuous aspossible, and be adapted to mobile and non-focused use.

For example, user 5 may use a more lightweight and less noticeable typeof headband, replace the headband with smart glasses or music-headset orearphones (so to be able to provide at least audio feedback during theout of session period). Such a headband may integrate severalcapabilities such as built-in ear-buds (possibly using bone conduction),multiple sensors (e.g. temperature, humidity, UV, motion etc.),physiological sensors (e.g. EMG, EEG, PPG, smart sensing electrodesetc.), direct physical effect generators (e.g. hot/cold, vibrations,odor etc.), communication modules (e.g. Wi-Fi, BLE, and Bluetooth), UIinteraction (through holograms, gestures, buttons etc.) and storage(e.g. using flash memory). Such a headband may be engineered for sleep(requiring comfortable use) as well as waking states.

In another example, user 5 may use full VR glasses for UI in the insession mode, but use AR glasses instead in the out of session mode. Inthis embodiment, the UI would not replace (and hide) the real world viewbut only augment it.

Thus, various parts of system 100 (e.g. the scripts, UI, stimuli anddirect physical effects) may function differently in various out ofsession conditions, and system 100 may be required to adapt scriptelements and content accordingly.

For example, script controller 2013 may instruct media handler 2061 tomodify the volume of audio content based on ambient noise level.

System 100 may also modify AR-based content based on what is viewed(e.g. indoors, outdoors, or specific scene. For example, scriptcontroller 2013 may move AR content elements so not to hide importantparts of the viewed scene.

As discussed herein above, scripts may be interrupted during sessions.Client script handler 201 may provide the ability to detect and dealwith different kinds of session interruptions. The detection isperformed by the elements of information analyzer 206. Client scripthandler 201 may offer multiple built-in interruption handlingmechanisms.

Script handler 201 may pause a script, may activate a specific scriptsegment (e.g. playing special recordings) and may reevaluate thephysiological state of user 5 to determine the point from which thesession should continue.

Script handler 201 may also allow user 5 to resume a script (e.g. afterthe interruption trigger has been handled).

It will be appreciated that a script may define multiple possibleinterruption points. When such a point is triggered, script handler 201may instruct the script to perform an orderly exit, possibly includingwaking the user up from a hypnotic state.

Script handler 201 may register an interruption point and may have adelay period associated with it. Such a delay period may be substantial(i.e. a few minutes), since the orderly exit procedure may take sometime.

It will be appreciated that it is the responsibility of the scriptdesigner to mark such points in their script and include hints to clientscript handler 201 on the proper handling and to provide the properhandling method for leaving the script smoothly (e.g. provide a relevantscript segment or audio track). Client script handler 201 may requirethe script to provide a minimal set of interruption points, so thescript can always be aborted at a nearby interruption point, taking nomore than a given time. Script compiler 171 may enforce thisrequirement, including checking for minimum duration between the pointswhen processing the script for inclusion in system 100 (e.g. in userscript store 160).

Script handler 201 may use the handling method (e.g. playing an audiosegment) and the hints that the script designer has provided as well asthe current and historical (general and specific to this session)physiological state to tell from where to continue when the session isresumed. It will be appreciated that script handler 201 may be requiredto repeat some of the script in some cases.

It will be appreciated that an interruption point may be triggered byscript controller 2013 in a number of situations, including (forexample), upon detection of current or imminent system failure (e.g.problem with the sensors, inter-component connectivity or battery aboutto run out before the script end etc.). Client hub 20 may pre-evaluatethe battery level on the (multiple) system elements involved in asession, so not to start a session if there is insufficient batterycharge left in any of the elements to complete the session. Still, abattery may run out due to malfunction, interruptions etc.

An interruption point may be triggered upon detection of a change in theenvironmental conditions which make the script running impossible orineffective as detected by environmental calculator 2064 (e.g. runningan audio-based script in an environment which suddenly became very noisyand continues to be so for a substantial period of time).

Another trigger is the detection of emotional distress or extremeemotional response in user 5 by information analyzer 206 (e.g. a scriptmentioning water used by a user with an acute fear of water) asreflected by the EEG and other physiological sensors and the detectionof other extreme physiological or physical conditions (e.g. high bloodpressure, uncontrollable shaking etc.) which may indicate some kind ofmental/physical distress. Script controller 2013 may also interrupt thescript even if information analyzer 206 cannot actually detect theunderlying media/physical distress by itself, but only its symptoms.

Another trigger is the detection of the user's body exceeding scriptlimitations set by the user himself for the session (as furtherdescribed above).

Other interruption triggers are the request to abort the script made bythe user 5 via an appropriate communication means implemented by system100 such as an abort key or button, an abort (spoken) “safe word” orgesture or other means which may allow user 5 to safely terminate thescript.

Similar to interruption points above, some scripts may also implementsuspension points if possible, though many scripts have no suchreasonable point. These suspension points may be used in the non-tranceparts of a session in case user 5 has to briefly suspend the session butmay return to it quickly. They are activated by a user-initiatedtrigger, and script controller 2013 may resume the session once user 5returns from the interruption.

In the general case it is highly unlikely that a script can be pausedand resumed, as it is very likely that the physiological state of user 5has changed due to the interruption. Thus, analyzer 206 should quicklyreevaluate the state of user 5 based on the physiological parametersbefore restarting the session.

Information Analyzer 206 may recognize distress conditions during scriptoperation which may include emotional, physiological or physicalconditions which may be related to the script operation, content,stimuli, direct physical effects or other effects.

User 5 himself may not be aware of such conditions, e.g. due toconditions involving unobservable internal physiological parameters(e.g. high blood pressure), due to being in a trance at the moment, ordue to the distress being of an emotional/psychological nature that usercan't consciously recognize or handle.

Post-session de-briefer 210 may log such distress conditions and reportthem to user 5 via client system 25's UI, so that user 5 is aware of theproblem with the given script in order to avoid it in the future (e.g.by not running the script or running a modified or alternate version).

Client script handler 201 may also report the issue to the scriptdesigner via script design system 50 together with supporting data aboutthe circumstances (anonymously and possibly subject to approval fromuser 5) so to help in the script's further tuning and development.

Information analyzer 206 (or possibly analyzer 134) may integrate insession period interactions and out of session period interactions. Forexample, in the out of system phase, behavior handler 2063 may monitorthe motions (or vital signs) of user 5 and attempt to recognizesmoking-related behaviors. Thus, when detecting (though behaviorrecognition) that user 5 is starting to handle a cigarette, analyzer 206may send this information to event handler/generator 205 which may checkto see that there is an out of session script segment associated withthe event (e.g. based on an event/response table stored in local DB208). If there is, event handler/generator 205 instructs script handler201 which may activate the script element which determines that avibration (serving as a cue to a post hypnotic anti-smokingre-enforcement suggestion) is the correct way to handle the situation.The script segment may then instruct DPE activator 2032 to administer avibration direct physical effect via the relevant wearable element 60.

This would both remind user 5 (at the conscious level) that he shouldnot smoke, and help trigger a suggestion (at the unconscious level) thatmakes cigarette handling undesirable, though this suggestion may havebeen activated already by merely touching the cigarette.

It will be appreciated that this reminder may also reinforce thesuggestion and associated behavior change, and furthermore serve as apositive or negative bio-feedback loop. For example, system 100 mayreward the user with a cool feeling (using cold-generation directphysical effect as described above) for desirable behaviors to bereinforced, and with low-voltage electrical current for undesirablebehaviors.

It will be appreciated that for the smoking cessation example, system100 may also detect (e.g. though a gas sensor) that user 5 has begunsmoking, while failing to recognize that the user picked up a cigarettebefore.

This could be because, for example, behavior handler 2063 has learnedhow to recognize cigarette picking from a pack in the shirt pocket ofuser 5, and user 5 has now picked up a single cigarette from his walletinstead.

Thus information analyzer 206 may review the earlier raw motion sensinginformation (saved for user 5) to recognize which motions user 5 made topick up a cigarette, and possibly instruct behavior handler 2063 tomodify its “cigarette picking-up recognition” filters (adapted to thespecific user), so to include the new motion types.

It will also be appreciated that system 100 may also monitor and measure(out of session) the frequency of such (cigarette handling) incidents,and information analyzer 206 may decide to provide this information tothe in session script via script handler 201 to be used in the next insession phase (e.g. by modifying the script or adapting it in some way).

Thus the pertinent script may attempt multiple suggestion types, andcould modify the suggestion used based on actual results, withoutrelying on subjective (or just imprecise) user 5 reports.

It will be appreciated that in this manner, the out of session phasesmay act as on-going A/B-test environments, allowing system 100 todynamically test script (and session) variations and to determine thebest result for the specific user. Such testing may also be performedduring the in session phase, but such in session testing may be moreconstrained as the behavior of the in session for user 5 is morecontrolled (e.g. user 5 will typically not smoke during an in sessionperiod, and thus cannot not provide actual feedback to asmoking-cessation script). It should be noted that for some script types(e.g. scripts which deal with issues that user 5 can't consciouslycontrol such as high blood pressure or restless leg syndrome), system100 may very well perform such A/B testing during the in session periodas well.

Furthermore, information analyzer 206 may detect additional, related orenvironmental information about the occurrence of such incidents (out ofsession) and may use this information to support the improvementprocess. For example, the analyzer 134 may deduce that user 5 is morelikely to smoke in the mornings, or while driving, and locate andtherefore information analyzer 206 may instruct script handler 201accordingly to include this information in the next session anappropriate script or sub-script related to these specific cases.

It will also be appreciated, that in addition to the above, informationanalyzer 206 may deduce (for example) that user 5 usually reaches for acigarette when within 5 minutes of reaching a certain level of stress ornervousness, as detected through a physiological measurement (e.g. EEGreading) or external detection (e.g. detection of extensive twitching orfidgeting by the motion detection sensors of system 100).

Information analyzer 206 may receive the information and may notifyscript handler 201. As a result, the script may include (for upcomingsessions) additional suggestions directing user 5 to relax whenever hereaches this stress level, e.g. by taking a short rest or a briefsession of meditation. Such rest should help user 5 avoid the desire tosmoke in the first place.

Information analyzer 206 may also directly notify the script designer(via script handler 201 and through system server 10 script designsystem 50) so that the script designer may create a specific script tohandle such cases, possibly including an updated version of the script.

Thus system 100 may then monitor and provide feedback on the secondaryrelaxation process in parallel with the monitoring and providingfeedback on the primary smoking prevention process.

Event handler/generator 205 may provide reminders to user 5 via asuitable interface from “it's time to take your next pill” to “it's anice weather outside, how about jogging?” It will be appreciated thatevent handler generator 205 may be activated according to informationprovided by multiple sources, such as behavior handler 2063 (e.g. “theuser is about to smoke” event as described above), information analyzer206 (e.g. “the user is suddenly very tense based on EEG analysis”),environmental calculator 2064, the system timer of client hub 20, scripthandler 201 (e.g. “set up a given music in x minutes”) or other sourcesthat setup event triggers. In an alternative embodiment, it may also beused by user 5 to set himself reminders.

It will also be appreciated that unlike the reminders provided byexisting systems (such as those provided by calendar software, alarmclocks and sport and fitness software), event handler generator 205 mayinitiate reminders based on external information from external sourcesto initiate the activity (e.g. the weather forecast and current weatherinformation as provided by Internet services in the jogging exampleabove).

The reminder may also depend on measured information both environmental(from environment detector 30A), location related and user-related(through the various sensors included in the out of sessionconfiguration). Thus, for example, event handler generator 205 will nottrigger a jogging reminder if it detects that user 5 is particularlytired (e.g. based on an EEG reading or motion detection). The remindermay be subliminal and may invoke a specific suggestion, i.e. thereminder is not a regular explicit (verbal or otherwise) urging, butrather a specific vibration or buzzing which has been associated with adesire to go out and jog. Thus, user 5 may (for example) configure eventhandler generator 205 (via script handler 201) so that “starting one dayafter each time I jog, induce me (though suggestion) to go jogging oncemore if I'm not at work (as defined by GPS), if the weather is good andI'm well rested”. The reminder may include an (implicit or explicit)urging to begin a new session when a script requires a series ofsession. This way, system 100 may handle some of the tendency of user 5to procrastinate, delay or skip sessions.

Analyzer 134 may analyze and create correlations based on informationcollected on multiple users (while preserving the privacy and anonymityof user 5), further supporting the goal of user 5 and scriptfunctionality.

It will be appreciated that the combination of the phases and insession/out of session interactions as described herein above, may allowsystem 100 to provide a feedback loop to user 5 and help him to reachhis goals, while simultaneously creating an environment which provides acomputerized feedback loop to the system's scripts, allowing the scriptsto improve their functionality.

It will also be appreciated that the out of session script executionenvironment may differ from the in session environment. In the insession environment, the script is typically required to conform to agiven time frame, but otherwise has full control of system 100 and thefull and dedicated attention of user 5, and may operate through a seriesof stages defined by the script designer.

It will be appreciated that in the out of session environment, there areno predefined stages and durations, and script and script segments maybe activated by script handler 201 based on their association with givenevents and event conditions. Such events could occur at pre-definedtimes or be based on a given user 5 behavior (e.g. system 100 hasdetected that user 5 has begun smoking) or a physiological or any otherevent (e.g. the blood pressure of user 5 has risen above a certainvalue) as described herein above.

It will be also be appreciated that system 100 may allow a single scriptto implement both an in session section and an out of session section.Such a script may have multiple entry points, some associated with insession use (e.g. different ways to run the script during in session)and some associated with specific event types in out of session use.

Alternatively, system 100 may implement multiple scripts (for in sessionand out of session use), and allow them to be associated, e.g. if user 5runs in session script X, system 100 may follow it with out of sessionscript Y for use following a given event.

Furthermore, if the in session environment is stable, the script canassume that the same configuration of elements (wearable elements 60 andnon-wearable elements 65) is used throughout the script execution.However, an out of session script may be constructed so to supportcertain degree of element configuration changes mid-run. System 100 mayprovide the underlying continuity and persistence (as discussed hereinabove), so that the script may continue running and be notified of theconfiguration change. The script may determine how to handle theconfiguration change, e.g. stop running, continue as usual or adapt tothe new configuration.

As discussed herein above, system 100 performs low-level processing andonly provides the scripts with high-level abstract data (e.g. asprovided by PBA 207) and with no access to the low-level raw data.However, system 100 may define certain scripts or script components asprivileged (requiring special approval), and allow such scripts specificaccess to some of the raw data. System 100 may also require user 5confirmation to such raw data (similar to the “this application wants touse your location data” prompts issued by smartphones for someapplication).

It will also be appreciated that privileged script components may alsoprovide specialized, complementary or additional functionality. Forexample, a third party vendor may offer a specific behavior recognitionprivileged component for some field of activity (e.g. tennis playing)and may allow script vendors to develop multiple tennis playingimprovement scripts, while provide common functionality which recognizesspecific tennis moves to all such scripts. As another example,components may be created which detect and analyze specific medicalconditions. Such components may also create additional system events,which can be used for script segment hooking (in session and out ofsession). System 100 may also provide a marketplace for such components,privileged or not, as part of designer store 150.

As discussed herein above, scripts may be created by script designers(which may be regular system users or professional vendors) via scriptdesign system 50. Reference is now made to FIG. 13 which illustrates theelements of script design system 50. Script design system 50 maycomprise a script coordinator 51, an editor 52 and an A/B test editor53.

Script coordinator 51 may receive updates from global analyzer 134regarding information and feedback which may have been gathered duringdifferent sessions as described herein above, and which may be relevantto scripts provided by the specific script designer. Editor 52 mayprovide an interface with a script designer or even a professional(psychologist etc.) which may be required to tweak a script accordinglyso to provide the best mode of therapy for a future use of specificscripts (by the current users or new ones). A/B test editor 53 mayanalyze the results of offering different scripts or script behaviors todifferent users as a result of a controlled A/B experiment as discussedin more detail herein below. Script design system 50 may also use directcommunication with the client hub 20 of a specific script user 5 toprovide premium services such as human support or intervention, possiblyrelated to the user of individualized script versions.

It will be appreciated that script design system 50 may be anInternet-based server which provides on-line editing of the scripts anddistribution to the users, delivered as Software-as-a-Service (SaaS).Alternatively, script design system 50 may support local editing ofscripts and alternative distribution method (physical media based ornetwork-based).

Editor 52 may also be used for the import and inclusion of contentsegments for use in scripts, and may provide media editing tools forsome of the media types.

The system 100 vendor may provide library of sample scripts and scriptelements. Third party vendors may also provide plug-in elements andother script segments and resources for use by script designers. System100 may support the use of templates (for complete scripts or scriptsegments), with template being provided by the system 100 vendor orthird party vendors. System 100 may offer all of the above (includingsample scripts, script elements, plug-in elements, third partyofferings/resources and script/segment templates) through designer store150.

System 100 also may support a media, script or script segmentmarketplace through designer store 150 and user script store 160, whichmay include various services to sellers and buyers including searching,marketing and billing services. Such billing may be integrated with themain system server, allowing billing options such as per installation,per use, per session, per hour of use, per results etc. Such billingoptions may be supported by the results of global analyzer 134, and maybe enforced by billing manager 180 (who could moderate a “paymentcontract” submitted by the script or script element writer, and paid bythe user of a script, or another script vendor which uses a scriptsection in his script). As an example of the latter case, a provider ofa high-quality hypnosis-deepening script segment may offer his scriptsegment in the designer store 150, and charge other script vendors usinghis script segment an amount calculated according to percentage of thelater script vendor revenues, or a per-minute of use amount. It shouldfurther be noted that system 100 may cooperate with third partyproviders of external designer stores 150 or user script stores 160.

It will be appreciated script handler 201 may run scripts locally andmay run with intermittent Internet connectivity or none at all. It willalso be appreciated that some back-end script elements may execute on avendor's server, a third party module and component providers' server oron a script designers' machine. It will be appreciated that scripts mayrun persistently while the element configuration changes.

System 100 may also support streaming of scripts and referenced mediafiles. Server coordinator 120 may perform such streaming based onearlier analysis of the script (e.g. during script compilation by scriptcompiler 171) which may determine the right schedule and sequence forstreaming of the various elements of the scripts, taking into accountthe structure and alternative paths of the script, the timeline of thescript execution, the size of the media files involved together with thepossible combinations of system elements (wearable elements 60 andnon-wearable elements 65) which receive the streamed media so tominimize element-to-element communication requirements. In particular,the combination of elements used by the current user, and the amount andtypes of storage available on each of the system 100 elements.

Script compiler 171 may also take into account information specific tothe current user, e.g. the execution history of user 5 for the givenscript as well as information on script execution from other users. Forexample, the script may contain multiple alternate large-size mediafiles for the same specific purpose. System 100 may determine that onlyone specific media file is suitable for the specific user, and discardother files so to reduce the compiled script size as part of scriptpersonalization when user 5 purchases a script from script store 160.

It will also be appreciated that script may specify the content to beretrieved. This could be though direct links, or through query/contentattributes. The actual selection of the media segments to be played maybe performed by PBA 207 (based on the script's instructions) asdiscussed in more detail herein below.

Script runner 2011 may analyze script instructions (arranged in a graphas discussed in more detail herein below) and may execute them by usingthe real-time collected “hints” provided by the active and non-activesensors and other possible script inputs as described in more detailherein below.

It will be appreciated that non-active sensor data may refer tocollected baseline and calibration data as well as collected informationabout user 5 responses to various script elements. It may also be usedto replace data from sensors which are malfunctioning or not available.Such data may also include previous analysis of the collected data asdescribed herein above.

It will be appreciated that each event, condition, or command may bedefined and may operate on different low-level inputs, such as gesture,breath, heart-rate, and so on. However, the script may typically operate(and make decisions) based on generic, higher-level inputs (concepts),for example, “relaxation”, “non-relaxation”, “script is working”,“script not working” and so on. Such higher-level inputs are generatedby PBA 207 based on information provided by the information analyzer 206combining multiple sensor inputs (i.e. sensor fusion) and use of theuser 5 baseline information.

It will also be appreciated that the EEG, all other sensors and thevarious author inputs (e.g. comments, expected user response marking andso on) may also be used as hints, once the script file has beendownloaded and the instructions are available. The physiological datasamples are only used as hints by script runner 2011.

Each line or group of lines in the script is executed based the scripttransition conditions as discussed herein above (state, neurologicalstate, psychological condition etc.). The granularity of the script isdetermined by the script designer.

It will be appreciated that neurological information analyzer 206 maymaintain a hypnogram to determine the sleep stage and neurological stateof user 5, and to record the sleep stage variations specific to user 5.

In this scenario, each edge in the script may have a weight associatedwith it, so that script runner 2011 may utilize these weights todetermine the next playable item in the current playing script. Asdiscussed herein above, the actual media segment selection willtypically be performed by PBA 207 based on the collected information forthe specific user (i.e. which media segment has the best effect on thisuser).

It will be appreciated that the script may be constructed using any ofthe models used in developing event-based systems, includingtree-structured, component based, template based, time-line based orotherwise. The following discussion refers to a common implementationinvolving a tree-structured script, although much of the discussion isrelevant to any other script structure. In an alternative embodiment,system script manager 170 may also include a script simulator 172 whichmay allow a script designer to “debug” his script. Such a facility mayallow the designer to play the script with dummy data, a specific user'spast data (if access is granted) or anonymized user data (possiblyselected according to user selection criteria) and see that the scriptfunctionality is correct. In an alternative embodiment, simulator 172may provide anonymized (or accessed-allowed) data for simulationexecution on script design system 50. System 100 may thus protect theprivacy of the users 5, while allowing developers to use collectedinformation for testing.

It will also be appreciated that scripts manage the display of outputs(including instructions, media, stimuli and direct physical effects asdescribed herein above) based on rules, inputs and a decision mechanism.The progress/transitions in scripts may be based on direct reading oranalysis of any of the following script inputs both in session and outof session. The inputs below may be values (e.g. current heart rate) aswell as event-type inputs (e.g. a specific detected motion or behavior).

The inputs may include information collected during the earlier phases(initial system learning (step 500), pre-execution profiling (step 510)and pre-session user evaluation (step 520), the current mode of the user(in session, out of session/awake, out of session/sleeping) and explicituser testing/feedback, e.g. “would you like to continue/abort?”, “do youfeel sleepy?” etc. Input may be received through any of UI methodsdetailed above, including in particular natural voice processing andgestures recognition (e.g. head nodding/shaking, hand raising etc.) butmay also include traditional input method (e.g. touch screen use).Script updater 2012 may add the inputs to the script accordingly.

Other inputs may include the cognitive/neurological state of the user(e.g. relative brainwave strengths), a specific sleep stage or stagechange (e.g. user entered NREM 3 sleep), recognized concepts/emotions(e.g. the user displays a given emotion), physiological sensor input(e.g. low heart rate, slow breathing pattern) and user response toexplicit instructions (e.g. “please lift your hand”) as recognized (forexample) by the pertinent motion detection capability.

Inputs may also include response to the outputs of other scripts (media,stimuli, and direct physical effects) including the exact timing of theresponse. This may include neurological state changes as well asphysiological, physical or other forms of response and user behaviordetection including explicit behavior (e.g. “user is smoking”) orimplicit/unconscious behavior (twitching, shaking of leg/head/body).

Other user related parameters may include reading of the user's bodylanguage, timing, including calculations based on desired session lengthand remaining time, session history, including current/previous sessionsand history of the user, including information measured during generalinteractions, out of session period and other scripts.

Parameters may also include out of session measured information,including relevant behavior information in particular (e.g. how oftendid the user smoke during the out of session, how effective was a givensuggestion during the out of session etc.), collected user baselineinformation, user profile information (including any medical or geneticinformation) and information gathered on other users (as relevant to theuser and properly anonymized) in particular users related to the currentuser through the use of the same or similar script, or through similaror related profile information (including medical condition or geneticsimilarity) together with intervention by user 5/system operator/scriptdesigner etc. Parameters may further include script designer hints suchas comments associated with tracks, expected user's response marking andso on.

As discussed herein above, PBA 207 may typically process the inputsabove and provide the running script with the abstract events (which areanalyzed and generalized). However, system 100 may handle some of theinputs differently. For example, some privileged system 100 componentsmay be granted specific access to some raw data (as noted above) andsome inputs may be handled completely by system 100 and not betransferred to the script at all. Some inputs may be gathered by system100 (e.g. in database 208) and provided to the script by PBA 207 only inanalyzed, summarized or generalized manner (but not in real time).

Some of these inputs may function as asynchronous input to the script.User 5 may use (for example) hand gestures at any time, and system 100may determine how and when to interpret or respond to them (e.g. abortor suspend the script, perform a pre-defined asynchronous functionality,send a specific event to the script etc.). Such asynchronous inputs mayinclude (for example) physical sensors, motion/gesture recognition andconcept recognition.

As discussed herein above, script design system 50 may maintain atwo-way communication and data collection channels between user 5 andthe designer or vendor of the script for a number of purposes.

A script may contact its designer via coordinator 51 and the scriptdesign system 50 interface in the case of a problem to request possibleresolution. It will be appreciated that system 100 may allow a set ofdesigner intervention methods which can be implemented by the script.

The script may also be designed so to include specific hooks/spaces fordesigner intervention. Such an intervention may be controlled by user 5who may limit or disable it entirely. Such an intervention may also be apremium service as discussed in more detail herein below.

Script design system 50 may collect performance/session history fromscript users via system script manager 170 retrieved from database 140for presentation to the script designer. System script manager 170 mayalso provide context and relevant profile and user history informationto help the script designer improve his script.

It will be appreciated that security/privacy manager 175 may guaranteeuser privacy/anonymity though limiting the information provided toscript design system 50. Alternatively security/privacy manager 175 mayallow detailed information access based on a generated random ID (peruser/session).

As discussed herein above A/B test editor 53 may provide the scriptdesigner with the means to include A/B tests in his script, define A/Bpopulation selection criteria (e.g. based on user profile details),manage the A/B test (create, close, accept, suspend, un-suspend, definepopulation etc.). A/B test editor 53 may also support multivariate testsin the same manner.

A/B test editor 53 may provide the summarized A/B testing reports to thedesigner who may (for example) determine which variant to use or furthermodify the test. A/B testing may be used in both in session and out ofsession periods.

It will be appreciated that the actual data structure of a script mayconsist of a script graph, some of whose nodes contain a decision modulewhich applies a set of probabilities as described below.

As discussed herein above, the edges in the script graph representbranching in the script flow. Such branches may reflect script progressdecisions (e.g. “script should move to the deepening session stage orstart inducing suggestions”), as well allowing system 100 to adapt thesession flow to different users (and provide different experience toeach). The decision is typically based on generic conditions such as“the user is focused” (as provided by PBA 207).

Reference is now made to FIG. 14 which illustrates a sample scripttransition graph and its elements. The script consists of nodes (A-I),directional edges between the nodes (e.g. A=>B, B=>A, B=>D and D=>B) andprobabilities associated with the edges (such as 0.1 probabilityassociated with the edge B=>C and the 0.3 probability associated withthe edge C=>B). It will be appreciated that in FIG. 14 probabilities areonly illustrated for the edges starting at nodes B and C.

It will be appreciated that there could be multiple node types. As isshown in FIG. 14, each node represents an interaction with user 5, andmay have media and instructions associated with it.

It will be further appreciated that the transition edges can also bebetween a node and itself (e.g. from node C to itself), signifying thatsystem 100 should re-perform the tasks associated with node C in suchcase.

For the sake of illustration, forward edges such as B=>C (whichrepresent the script progress) are shown using full lines, whereasbackward edges such as C=>B (which represent a problem case in which thescript has to return to previous stage) are shown using dash lines.

As can be seen from the example, the sum of probabilities for thedifferent outgoing edges for each node should be exactly 1.0. Forexample, the outgoing edges from node C have the probabilities 0.3(C=>B), 0.1 (C=>C) and 0.6 (C=>F), with 0.3+0.1+0.6=1.0.

System 100 would start the session with node A (start) and from it moveto node B (introduction). From node B the system would move to one ofnodes C (beach relaxation), D (river relaxation) and E (rain relaxation)depending on the outgoing edge probabilities of node B.

Each of the relaxation nodes C, D and E represents a different scenedescription conveyed to the user to support the relaxation process.System 100 may determine (for example) to transition to node E (rainrelaxation) based on the probabilities associated with node B. It shouldbe noted that system 100 may have modified these probabilities, e.g.based on previous experience with this user or other user in pastsessions.

Script runner 2011 may then begin executing the instructions associatedwith node E. System 100 may describe to user 5 how he is standing in thecool rain, feeling the water flow over him and therefore user 5 maybecome relaxed.

System 100 may analyze the response of user 5 (as measured by thevarious system 100 sensors and received by information receiver 204) todetermine how likely it is that user 5 has reached the appropriaterelaxation level. Based on the user 5 response, system 100 and theanalysis performed by information analyzer 206 and global analyzer 134may modify the probabilities associated with the edges associated withnode E.

Script runner 2011 may then transition to node F (bucket sand). In thisnode, system 100 instructs user 5 with a suggestion that he is holdingin his stretched hand a bucket and the bucket gradually becomes filledwith sand and becomes heavier. If the suggestion affects user 5, hishand would automatically drop (due to the “weight of the sand in thebucket”), confirming the suggestibility of user 5 at this point. If thisfails, analyzer 134 may adjust the probabilities, and go back possiblygoing back all the way to B and selecting a different relaxation method(e.g. node C river relaxation).

Script runner 2011 may also perform non-graph transitions due to variousevents or exceptions, such as aborting the script (or returning to aspecific point) when certain predefined, physiological limits areexceeded (e.g. blood pressure), user 5 has requested the script to stopto suspend it for a short time and a time limit has been exceeded etc.

The script may define computation areas, i.e. set of nodes which arerelated and affect each other's probabilities. For example, nodesB/C/D/E may be in the same computations area X, since the success ofeach of the relaxation nodes C/D/E may affect the probabilities of thetransitions from B to C/D/E.

As discussed herein above, the mentioned probabilities may be calculatedby analyzer 134. Analyzer 134 may use information collected in database140, including collected historical user inputs (signals and otherwise),computed scripts alternatives paths and as multiple active sessionsignals to build a set of feature vectors. These feature vectors allowanalyzer 134 to effectively compute current script transitionprobabilities which will produce the most effective script paths totaken by client system 25 when the script is run.

Server ML engine 136 may employ multiple machine learning approaches anddata representation in each script computation round. The approaches anddata representations may include (for example) any of the following or acombination thereof: decision tree learning or regression trees, asupervised learning method that is trained with the most effectivefeature vector, where each decision tree node tests a feature andeventually used to build the model to predict the target values that areused to discriminate and classify the best script's path. The learningcould also be partially leveraged with methods such as KNN, ormulti-class Support Vector Machines (SVM's). Another option isartificial neural networks with possibly multilayered feed-forwardarchitecture.

It will be appreciated, that in one possible implementation, the scriptitself may be represented using a hierarchically structured datadescription language (such as XML or JSON). Such a language/format maybe used to represent the source version of the script, and may also beused (in a binary version) to represent a compiled version of thescript.

The script may include a set of such files, with associated media andrelated files (which are required for the script to run), as well asper-user data files that are needed and generated per user and session.

The main script file may be a static file which is read only and is thefile created by the script author, and is the file which includes linksto media files. The script may include other dynamic script files thatare created and updated on the fly and which are linked by the staticfile.

As discussed herein above in relation to FIG. 14, each node may be acommand, event or condition. It will be appreciated that these nodetypes may be blocking or non-blocking.

For example, the script may want to play a certain track and wait for itto finish before it plays the next, so the graph may include a nodespecifying a “Play” command in a blocking mode. A similar concept may beapplied to events; the script designer may decide that only when user 5is nodding it can continue with the session, so the designer may use ablocking wait event.

On the other hand, a non-blocking event may be used to stop the scriptif user 5 starts shaking at any time during the script execution orplaying multiple media files simultaneously as confusion script.

It will be appreciated that each command, condition or event may takeseveral parameters, some static (i.e. defined by the script designer)and others dynamic (i.e. inputs provided by the sensors measuring thephysical, physiological and other parameters of user 5. Dynamicparameters may be used, for example to synchronize music stimuliplayback speed with the user's heart rate or other synchronizationrates, to administer a vibration direct physical effect based on therelaxation level (e.g. uses a slower vibration when the user is morerelaxed) or to apply a hot/cold direct physical effect to calm the userwhen he is not relaxed.

It will be appreciated that system 100 may run the same scriptdifferently to different people. As a given script will be used by manyusers, and getting a certain person to a certain state is usuallynon-deterministic, system 100 may personalize the script. Suchpersonalization may be applied to the transition graph and to theprocess of applying probabilistic reasoning to the tree edges. Thepersonalization may allow script runner 2011 to determine what to playnext, which sounds, event or direct physical effects to operate to routeuser 5 to the defined state of mind. It will be appreciated that eventhe same user might like or hate different things at different times.

Decision maker 2067 may use (in real time or off-line) a learningmechanism transition graph to assign probabilities for each option inthis regression, and may make decisions on how to maximize the impact ofthe script on each individual by selecting the best course of action.

It will be appreciated that that the probabilities described hereinabove are typically pre-computed by decision maker 2067 based on theinformation provided by the script designer, calibration information ofuser 5, user preferences and the history of user 5). Decision maker 2067may also modify the probabilities in real-time, merging them withreal-time gathered session real-time information.

The script designer may determine an initial set of edge conditions andprobabilities, based on his (generic) knowledge and with the help ofrecommendations made by system 100. However, the script designer cannotpossibly predict the entire range of possibilities and options for eachuser.

It will be appreciated that decision maker 2067 may use a learningmechanism which is applied to each transition graph for such scriptdecision nodes. At each decision node of the script graph, script runner2011 may try to predict which branch should be taken based on the usersensor input. To do this, system 100 may use the current and historicaldata for user 5 as well as different users' history data that determinesthe likelihood of taking each branch from the current decision node.

It will also be appreciated that ML engine 136 may base its learning onthe information gathered by information processor 130 for the currentuser, as well as information collected from other users.

ML engine 136 may further locate additional users and draw from theirexperiences to train system 100 for current users. ML engine 136 maylocate users based on similarity of data in their userprofile/information, similar responses to common patterns (stimulus orotherwise), similar data in session logs (e.g. similar sequences ofvalues of measured physiological parameters),

It will be appreciated that system 100 may employ multiple inter-relatedlearning systems. For example, ML engine 136 may train a learning systemat the user level and a different one at the script level. Thus, theuser level system may acquire knowledge about the specific user (e.g.personalized signatures (PBPS's) for various behaviors) which may beapplicable to multiple scripts. In parallel ML engine 136 may train thescript level learning system which correlates session results frommultiple users of the same script.

ML engine 136 may take into account input values not provided to thescript (i.e. measured by system 100 but not actually provided orrequired by the script), so to gradually improve the ability of system100 when the script is run.

System 100 may support dynamic mode authoring (as discussed hereinabove), in which the speed and parameters of various system processesare adjusted based on biological signs or other detected rates that areread from user 5 (through the various system sensors) in real-time asdetailed for synchronized media delivery as described herein above.

Script updater 2012 may adjust the script accordingly based on readingsfrom global analyzer 134. Such processes may include (for example):media delivery (audio, video etc.), script direction/branch predilection(e.g. timing script loops according to heart rate or brain waves) andcontinuous direct physical effect activation (e.g. changing level ofheat or cold according to a given rate).

It will be appreciated that the script designer may opt to includecertain parts as dynamic while others as static (played as is). Botheditor 52 (which specifies the dynamic mode elements) and PBA 207 (whichprovides the dynamic mode media presented based on directives fromscript runner 2011) may implement this. It will be appreciated that atthe basic level, this capability may allow a designer to specify that agiven segment of music will be synchronized with the heart rate orbreathing patterns of user 5. As another example, system 100 mayrecognize the power-lifting rhythm of user 5 in a gym, and provide avocal encouragement (possibly associated with a suggestion) after every10 power lifts.

It will also be appreciated that a script may employ continuous changeof the played media. Instead of switching complete media segments (e.g.switching to a new music track to get a better trance state), mediadeliverer 611 may continuously modify played segments and their playingparameters. In this scenario, script controller 2013 may try tocorrelate changes to the media with changes in the resulting brainwavepatterns and other indications detected by the system sensors similar todynamic mode support described above.

Sample media changes may include changing music speed, volume orbi-aural parameters and having music recorded with multiple tracks andchanging different track parameters, track mixing parameters, or justadding or removing tracks.

Thus script controller 2013 may introduce dynamic variationsautomatically, e.g. via a genetic-algorithm type system which introducesvariations (mutations) so to find the best mutation(s) based on thedetect trance state and sensors or based on a success criteria definedby the script. It will be appreciated that this genetic algorithmmechanism may unite feedback results from multiple users to locate thebest variations.

In an alternative embodiment to the present invention, system 100 mayoffer human intervention as premium service. The discussion herein abovehas referred to fully an autonomous script execution by script runner2011, which does not require human intervention. However, system 100 mayallow offering human intervention (e.g. as a premium service). Thiscould be the script designer, the system operator or a fourth party.

It will be appreciated that such intervention may be integrated into thescript execution, i.e. the script designer can leave “hooks” or “spaces”for human intervention. The script should be flexible enough to supportdifferent time periods and manners of intervention.

The script may include elements which together create a secondary UIdynamically to be used by a human intervenor/operator. These could be afull specification of such UI, or parameters used by the system togenerate a UI for use by the intervenor.

Security/privacy manager 175 may allow user 5 to limit or disable scriptdesigner intervention (including “intervenor firewall” “only let Xintervene on issue Y”). The design may allow a fourth party (non-scriptdesigner) to provide human intervention services.

In yet another embodiment, user 5 may allow security/privacy manager 175to use a relaxed privacy/anonymization policy to system 100, to allowthe human intervenor to access specific parts of the detailed user 5information collected by system 100. Such a relaxed policy may bespecified on per-item basis, with user 5 being able to define preciselywhat items of information are provided in full detail, what insummarized form and what items are not provided.

The relaxed policy may define items of information that could beaccessed in real time, and items which could only be accessedpost-factum (e.g. after the session) and the frequency of access.

In yet another embodiment, system 100 may support personalized scriptswhich are designed and adapted specifically for user 5. In thisscenario, the system 100 vendor or third party script designers mayprovide such customization services, tailoring the script to therequirements and characteristics of a specific ordering user.

The customization may be based on an existing script, existing scripttemplate or include a specialized script created for the ordering user.User 5 may approve a relaxed privacy/anonymization policy to the systemfor customized script designer access (as discussed herein aboveregarding human intervention). User 5 may also allow the customizationto be integrated with human intervention by the script customizationprovider.

It will be appreciated that system 100 may be adapted to supportpregnancy and childbirth either for the pregnant women by herself, or inconjunction with additional people supporting the pregnancy and thebirth (e.g. the father, or a professional doula/birth companion) asdiscussed herein above. System 100 may greatly help with the stressinherent to the many phases of the pregnancy and to the birth inparticular.

In this scenario, system 100 may include sensors to gather informationabout delivery and contractions, as well as fetal heartbeats (though notfor the purpose of medical diagnosis) and to allow scripts tosynchronize to that information. Such information may be gathereddirectly from the laboring woman, or from existing medical devices whichgather birth related information.

Such gathering of information may be performed done using a directsoftware/electrical interface, by using vision and scene analysiscapabilities of system 100 to “read” existing system displays as a humanbeing would do and without requiring a specialized interface. System 100may include a set of such virtual interfaces (e.g. specificimage/display recognition modules) adapted to common medical instrumentsavailable in the delivery room.

The information may then be used in conjunction with scripts andhypnosis as usual. A person supporting the childbirth (e.g. a speciallytrained nurse, assistant doula or the father) may also use system 100,using a script which provides hooks for human intervention as describedherein above.

The delivery-related sessions can leverage data that was collectedpreviously during pregnancy and pre-delivery periods to determine whatthe best treatment is and how to operate. Such data may also includedata gathered separately (e.g. from medical examinations performed by anexamining physician or laboratory tests).

System 100 may also use a pregnancy/childbirth profile adapted to aspecific user and in particular can use a profile gathered from pastpregnancies and births of the same user. System may also use a pregnancyprofile based on the analysis of pregnancies of other women, possiblefiltered according to similarity to the using women based on variousparameters and attributes.

It will be appreciated that script runner 2011 may ensure that multiplescripts running simultaneously during an out of session phase do notinterfere with each other using the methods described below. This mayhappen, for example, if two scripts (associated with different events)operate due to both events happening.

The script authors may define critical sections—script sections whichshould not be interrupted. In such a case, script controller 2011 maylimit the length of such sections. Script controller 2011 may also forcethe script author to provide proper handling for such interference. Suchlimitations may also be verified statically (i.e. when the script isuploaded to system 100) through server script verifier 174 or clientscript verifier 2014.

Script runner 2011 may also determine script priority according toparameters provided by user 5 and environment calculator 2064. Forexample, user 5 may run a smoke cessation script in the office and sportencouragement script in the gym. Script runner 2011 may then determinescript priority based on location detection by GPS, activity type, userstate and sensor reading.

In another embodiment to the present invention, system 100 may provide anumber of security-related mechanisms. Server script verifier 174 andclient script verifier 2014 may perform automatic identification,analysis and blocking of ill-intentioned scripts. Such blocking may beperformed (for example) at upon script submission to the system vendor,upon script compilation by script compiler 171, upon scriptpurchase/download to the user and upon script running.

Server script verifier 174 and client script verifier 2014 may blockscripts based on the identification of undesired scripts, or on analysisof the script content. Such analysis may require converting mediaelements (graphic, video and audio) into analyzable text format, andlooking for inappropriate content or methods of delivery. The conversionmay be performed via speech recognition engine or an OCR (applied tostill graphics or video frames).

Client script verifier 2014 may further implement user-definedlimitations and criteria for analysis and possible blocking of scriptsstarting at the script purchase stage, possibly even filtering thescripts which are offered to user 5 (similar to a motion pictures ratingsystem). This can be done by user 5 himself, or by another user settingup the system (as is done in browsing parental control systems).

System 100 may also be configured to block specific content/media andnot entire scripts. Server script verifier 174 and client scriptverifier 2014 may allow scripts to specify alternative content to thatblocked.

As discussed herein above, system 100 gathers substantial informationabout the physical, physiological and behavioral information of user 5into log files as described herein above. It will be appreciated thatthe actual raw data is only saved on the system 100 vendor's servers.The script vendors may only receive limited, analyzed information and aneed-to-know basis as provided by PBA 207 or by security/privacy manager175.

For example database 140 may store a complete record of the locationhistory and motion tracking data for user 5. However, user 5 may only beusing a smoking cessation script, which only gets the information on theoccasions that user 5 picks up a cigarette or actually smokes. User 5may also define a retention period for the raw data, after which thedata is completely erased, or is “reduced” to a summarized form usefulfor the classes of the scripts the user is interested in.

Thus system 100 may implement cognitive state alteration techniques(such as hypnotherapy), allowing a user to achieve personalself-improvement or other goals. In particular, system 100 combineswearable and non-wearable hardware and software elements, and interactswith the user during therapeutic sessions as well as non-sessionperiods. The interactions are based on information gathered throughcontinuous monitoring of the user, collected user information andadditional sources. System 100 integrates the information gatheredduring the session and non-session periods and may analyze and use thisanalyzed information to update scripts in order to improve treatment.

Unless specifically stated otherwise, as apparent from the precedingdiscussions, it is appreciated that, throughout the specification,discussions utilizing terms such as “processing,” “computing,”“calculating,” “determining,” or the like, refer to the action and/orprocesses of a general purpose computer of any type such as aclient/server system, mobile computing devices, smart appliances orsimilar electronic computing device that manipulates and/or transformsdata represented as physical, such as electronic, quantities within thecomputing system's registers and/or memories into other data similarlyrepresented as physical quantities within the computing system'smemories, registers or other such information storage, transmission ordisplay devices.

Embodiments of the present invention may include apparatus forperforming the operations herein. This apparatus may be speciallyconstructed for the desired purposes, or it may comprise ageneral-purpose computer selectively activated or reconfigured by acomputer program stored in the computer. The resultant apparatus wheninstructed by software may turn the general purpose computer intoinventive elements as discussed herein. The instructions may define theinventive device in operation with the computer platform for which it isdesired. Such a computer program may be stored in a computer readablestorage medium, such as, but not limited to, any type of disk, includingoptical disks, magnetic-optical disks, read-only memories (ROMs),volatile and non-volatile memories, random access memories (RAMs),electrically programmable read-only memories (EPROMs), electricallyerasable and programmable read only memories (EEPROMs), magnetic oroptical cards, Flash memory, disk-on-key or any other type of mediasuitable for storing electronic instructions and capable of beingcoupled to a computer system bus.

The processes and displays presented herein are not inherently relatedto any particular computer or other apparatus. Various general-purposesystems may be used with programs in accordance with the teachingsherein, or it may prove convenient to construct a more specializedapparatus to perform the desired method. The desired structure for avariety of these systems will appear from the description below. Inaddition, embodiments of the present invention are not described withreference to any particular programming language. It will be appreciatedthat a variety of programming languages may be used to implement theteachings of the invention as described herein.

While certain features of the invention have been illustrated anddescribed herein, many modifications, substitutions, changes, andequivalents will now occur to those of ordinary skill in the art. It is,therefore, to be understood that the appended claims are intended tocover all such modifications and changes as fall within the true spiritof the invention.

What is claimed is:
 1. A cognitive state alteration system, the systemcomprising: at least one of: a wearable element and a non-wearableelement to measure state or activity of a subject and to provide atleast one stimulus to said subject; a storage unit to store in sessionscripts and associated out of session scripts, for cognitive statealteration processes, wherein each cognitive state alteration processcomprises first and second in session media-based treatment processesand an out of session reinforcement stimulus process between said firstand second in session media-based treatment processes, to track saidstate or said activity and to trigger at least one reinforcementstimulus to reinforce a goal at least for said first in sessionmedia-based treatment process, each said in session script and each saidout of session script to manage said at least one of: said wearableelement and said non-wearable element and wherein a first said insession script manages said first in session media-based treatmentprocess and each said out of session script manages an associated saidout of session reinforcement stimulus process for said first in sessionmedia-based treatment process; and at least one processor implementing acognitive state alteration unit, said cognitive state alteration unitcomprising: a script handler at least to run said first in sessionscript and said out of session script associated with a cognitive statealteration process selected by said subject from said storage unit; aninformation analyzer at least to perform analysis of readings of atleast one of: said wearable element and said non-wearable element duringsaid selected cognitive state alteration process; said informationanalyzer comprising: a behavior handler to administer said at least onereinforcement stimulus in response to an analysis at least of physicalbehavior of said subject during said out of session reinforcementstimulus process; and an environment calculator to determine state ofsurrounding environment of said subject during said out of sessionreinforcement stimulus process and at least to remove any effect on saidreadings utilized by said information analyzer; an integrator tointegrate said analysis at least from said selected cognitive statealteration process in said first in session media-based treatmentprocess and said associated out of session reinforcement stimulusprocess; and a script updater to update at least one of said first insession script and said out of session script for said selectedcognitive state alteration process in response to said analysis and tosaid integrated analysis.
 2. The cognitive state alteration system ofclaim 1 and also comprising a de-briefer to collect user feedbackinformation about said first in session script, said out of sessionscript, said first in session media-based treatment process, and saidout of session reinforcement stimulus process and wherein saidinformation analyzer comprises: a decision maker to make decisions onhow to maximize an impact of at least one of said first in sessionscript and said out of session script for said selected cognitive statealteration process based on at least one of said integrated analysis andpost session debriefing from said de-briefer; and a machine learner toupdate at least one of said first in session script and said out ofsession script for said selected cognitive state alteration processbased on subject data from any of said first in session script and saidout of session script, subject data from multiple subjects using any ofsaid first in session script and said out of session script and multiplesubjects using scripts similar to any of said first in session scriptand said out of session script.
 3. The cognitive state alteration systemof claim 1 and wherein said non-wearable element is a camera.
 4. Thecognitive state alteration system of claim 1 and wherein said at leastone of: said wearable element and said non-wearable element comprises asensor to read results of at least one of an EEG (electroencephalogram),a HRV (heart rate variability), an EMG (electromyography) a GSR(galvanic skin response), an ECG (electrocardiogram), and a PPG(photoplethysmogram).
 5. The cognitive state alteration system of claim1 and also comprising an event handler defining events to be respondedto for said selected cognitive state alteration process and an outputdeliverer to activate at least one of: a direct physical effect (DPE)activator, a media presenter, earphones and a wearable screen accordingsaid first in session script and said out of session script and inresponse to said events.
 6. The cognitive state alteration system ofclaim 1 and wherein said information analyzer further comprises at leastone of: a media handler to handle at least delivery of media to saidsubject and selection and adaptation of media segments; a neurologicalhandler to receive neurological readings and to analyze a neurologicalstate of said subject based at least on said neurological readings; andsaid behavior handler to also detect indicators of a psychological stateof said subject.
 7. The cognitive state alteration system of claim 1 andwherein an output is at least one of: a stimulus, a media element and aninstruction.
 8. The cognitive state alteration system of claim 1 andwherein said selected cognitive state alteration process comprises atleast one of: hypnosis, meditation, psychoanalysis, psychotherapeutichandling, pregnancy support, combined therapies and nerve stimulation.9. The cognitive state alteration system of claim 1 and also comprisinga neuro-linguistic programming (NLP) analyzer to utilize NLP-basedanalysis of said subject's communication with a surrounding environmentto support the progress of said subject towards desired goals.
 10. Thecognitive state alteration system of claim 1 and wherein saidinformation analyzer also comprises a physiological behavior analyzer toadminister said at least one reinforcement stimulus in response to ananalysis of physiological behavior.
 11. The cognitive state alterationsystem of claim 2 and also comprising a script runner to run said firstin session script and said out of session script, wherein said scriptrunner causes a transition to a new state upon receipt of an indicationof at least one of: sleep stage synchronization, pre-definedneurological states, pre-defined physiological states, timing, includingcalculation based on desired session length and remaining time and anintervention by at least said subject.
 12. The cognitive statealteration system of claim 2 and also comprising a script runner to runsaid first in session script and said out of session script, whereinsaid script runner causes a transition to a new state upon receipt of ananalysis based on at least one of: user profile information, explicitsubject feedback, subject's cognitive or neurological state,neurological state reading, physiological sensors reading, subjectbehavior detection, post-session feedback from said subject andinformation from other subjects.
 13. The cognitive state alterationsystem of claim 11 and wherein each said transition has a transitionprobability associated therewith and said script updater updates saidtransition probabilities.
 14. The cognitive state alteration system ofclaim 12 and wherein each said transition has a transition probabilityassociated therewith and said script updater updates said transitionprobabilities.
 15. The cognitive state alteration system of claim 3 andwherein said storage unit, script handler, information analyzer,integrator and script updater and de-briefer are implemented on aclient/server system.
 16. A cognitive state alteration method, themethod comprising: having at least one of: a wearable element and anon-wearable element to measure state or activity of a subject and toprovide at least one stimulus to said subject; storing in sessionscripts and associated out of session scripts for cognitive statealteration processes, wherein each cognitive state alteration processcomprises first and second in session media-based treatment processesand an out of session reinforcement stimulus process between said firstand second in session media-based treatment processes, to track saidstate or said activity and to trigger at least one reinforcementstimulus to reinforce a goal at least for said first in sessionmedia-based treatment process, each said in session script and each saidout of session script to manage said at least one of: said wearableelement and said non-wearable element and wherein a first said insession script manages said first in session media-based treatmentprocess and each said out of session script manages an associated saidout of session reinforcement stimulus process for said first in sessionmedia-based treatment process; running said first in session script andsaid out of session script associated with a cognitive state alterationprocess selected by said subject; performing analysis of readings ofsaid at least one of: said wearable element and said non-wearableelement during said selected cognitive state alteration process, saidperforming analysis comprising: administering said at least onereinforcement stimulus in response to an analysis at least of physicalbehavior of said subject during said out of session reinforcementstimulus process; and determining state of surrounding environment ofsaid subject during said out of session reinforcement stimulus processand at least removing any effect on said readings utilized by saidperforming analysis; integrating said analysis at least from saidselected cognitive state alteration process in said first in sessionmedia-based treatment process and said associated out of sessionreinforcement stimulus process; and first updating at least one of saidfirst in session script and said out of session script for said selectedcognitive state alteration process according to results of saidintegrating and said performing analysis.
 17. The cognitive statealteration method of claim 16 and also comprising collecting userfeedback information about said first in session script and said out ofsession script, said first in session media-based treatment process andsaid out of session reinforcement stimulus process and wherein saidperforming comprises: making decisions on how to maximize an impact ofat least one of: said first in session script and said out of sessionscript for said selected cognitive state alteration process based on atleast one of said integrating and said collecting; and second updatingat least one of said first in session script and said out of sessionscript for said selected cognitive state alteration process based onsubject data from any of said first in session script and said out ofsession script, subject data from multiple subjects using any of saidfirst in session script and said out of session script and multiplesubjects using scripts similar to any of said first in session scriptand said out of session script.
 18. The cognitive state alterationmethod of claim 17 and wherein said running comprises: third updatingeach said in session script and each said out of session script fromupdates from said first updating and second updating.
 19. The cognitivestate alteration method of claim 16 and also comprising defining eventsto be responded to for said selected cognitive state alteration processand activating at least one of: a direct physical effect (DPE)activator, a media presenter, earphones and a wearable screen accordingto each said in session script and each said out of session script andin response to said events.
 20. The cognitive state alteration method ofclaim 16 and wherein said performing analysis further comprises at leastone of: handling at least delivery of a media to said subject andselection and adaptation of media segments; receiving neurologicalreadings and analyzing a neurological state of said subject based atleast on said neurological readings; and said monitoring movements ofsaid subject to also detect indicators of a psychological state of saidsubject.
 21. The cognitive state alteration method of claim 16 andwherein an output is at least one of: a stimulus, a media element and aninstruction.
 22. The cognitive state alteration method of claim 16 andwherein said selected cognitive state alteration process comprises atleast one of: hypnosis, meditation, psychoanalysis, psychotherapeutichandling, pregnancy support, combined therapies and nerve stimulation.23. The cognitive state alteration method of claim 16 and wherein saidrunning comprises causing a transition to a new state upon receipt of anindication of at least one of: sleep stage synchronization, pre-definedneurological states, pre-defined physiological states, timing, includingcalculation based on desired session length and remaining time and anintervention by at least said subject.
 24. The cognitive statealteration method of claim 23 and wherein each said transition has atransition probability associated therewith and said first updatingcomprises updating said transition probabilities.
 25. The cognitivestate alteration method of claim 16 and wherein said running comprisescausing a transition to a new state upon receipt of an analysis based onat least one of: user profile information, explicit subject feedback,subject's cognitive or neurological state, neurological state reading,physiological sensors reading, subject behavior detection, post-sessionfeedback from said subject and information from other subjects.
 26. Thecognitive state alteration method of claim 25 and wherein each saidtransition has a transition probability associated therewith and saidfirst updating comprises updating said transition probabilities.
 27. Thecognitive state alteration method of claim 16 and also comprisingutilizing NLP-based analysis of said subject's communication with asurrounding environment to support the progress of said subject towardsdesired goals.
 28. The cognitive state alteration method of claim 16 andwherein said performing analysis also comprises administering said atleast one reinforcement stimulus in response to an analysis ofphysiological behavior.